I would suggest looking at the data structure for a given file and “cutting out” the data at the corresponding point along the line so that frames are not dropped earlier.
This would mean looking at the recording frequency and bit rate and using it to get the size (in bits) of each frame. You can then take audio segments without cutting individual frame data.
Check out this SO post . He suggests treating your sound as a binary reading string. Since this is a line, you can basically copy, cut, and move the line as you want into a new output file.
Check it out: http://docs.python.org/library/binascii.html
Also worth a look: https://ccrma.stanford.edu/courses/422/projects/WaveFormat/
, . , , . MP3 , :
http://en.wikipedia.org/wiki/Mp3#File_structure
, .
: , , , : http://sourceforge.net/projects/audiotools/
....
bits_per_sample() from sourceforge.net
- Returns the number of bits-per-sample in this audio file as a positive integer.
, . RAW.
16. . , .