Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3316036
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:25:18+00:00 2026-05-17T22:25:18+00:00

Recommendations welcome on how to slice a .wav 1 file into time-delimited segments using

  • 0

Recommendations welcome on how to slice a .wav1 file into time-delimited segments using a Python library.

1 The actual file type isn’t really that material, I’m sure I’ll be able to convert between different types if needed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T22:25:19+00:00Added an answer on May 17, 2026 at 10:25 pm

    I would suggest looking at the data structure for a given file, and ‘cutting’ the data at an appropriate point along the line so no frames are chopped off early.

    This would mean looking at the frequency of the recording and the bit rate, and using that to get the size (in bits) of each frame. Then you can take segments of audio without cutting individual frame data.

    Have a look at this SO posting. It suggests treating your audio as a binary read string. As it’s a string you can basically copy, cut and move the string as you want to a new output file.

    Check this one out: http://docs.python.org/library/binascii.html

    Also worth looking at: https://ccrma.stanford.edu/courses/422/projects/WaveFormat/

    Either that or just keep it as binary and use byte arrays. Need to think about the header file and what happens to that, although each format is different. MP3 is easy to keep the header as it is interleaved amongst the data:

    http://en.wikipedia.org/wiki/Mp3#File_structure

    Ok, a bunch of stuff.


    FINALLY: One you’ll no doubt have seen already: http://sourceforge.net/projects/audiotools/

    Updated….

    Use the bits_per_sample() method in the audio tools link from sourceforge.net

    —Returns the number of bits-per-sample in this audio file as a positive integer.

    Then divide your audio into a byte array using that info and some of the info from above. You can then at least reconstruct accurately some RAW audio data.

    You can take the length of the file in bits and divide it by 16. You can then use a method divide the array according to time in milliseconds. It sounds complicated but it’s really rudimentary maths.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

any good recommendations for databinding. i am starting to look into WPF more and
I'm looking for some recommendations for a python web application. We have some memory
I have a custom project type based on the C# Class Library project type
I'm building some predictive models in Python and have been using scikits learn's SVM
I'd like to write a simple wrapper for the python list type that forces
Any recommendations on what UIView to use on the iPhone to create a listed
If one calculates the recommendations for a boolean DataModel, the RecommendedItems have some numbers
Does anyone have recommendations on the best Online Store for non-technical users of Joomla?
I need recommendations on a good Unit Testing book for use with ASP.NET MVC.
I need recommendations for a good (free) development notepad to work in on my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.