mp3 wav editing in python

Y

yb

Hi,

Is there a python based tool to cut mp3 and wav file at a start and end
time? I'm looking for a python script that can output a new wav or mp3
file based on star and endpoint.

Thank you
 
?

=?ISO-8859-1?Q?Daniel_Sch=FCle?=

yb said:
Hi,

Is there a python based tool to cut mp3 and wav file at a start and end
time? I'm looking for a python script that can output a new wav or mp3
file based on star and endpoint.

Thank you

there is a wave module
['Chunk', 'Error', 'WAVE_FORMAT_PCM', 'Wave_read', 'Wave_write',
'__all__', '__builtin__', '__builtins__', '__doc__', '__file__',
'__name__', '_array_fmts', 'big_endian', 'open', 'openfp', 'struct']['__del__', '__doc__', '__init__', '__module__', '_compname',
'_comptype', '_convert', '_data_chunk', '_data_seek_needed', '_file',
'_fmt_chunk_read', '_framerate', '_framesize', '_i_opened_the_file',
'_nchannels', '_nframes', '_read_fmt_chunk', '_sampwidth', '_soundpos',
'close', 'getcompname', 'getcomptype', 'getfp', 'getframerate',
'getmark', 'getmarkers', 'getnchannels', 'getnframes', 'getparams',
'getsampwidth', 'initfp', 'readframes', 'rewind', 'setpos', 'tell']

and so on, this is what google gave me
http://scipy.mit.edu/tutorials/wave.pdf

I did some wave ploting with matplotlib module, so I think
it's feasible to cut and write wave files too

as for mp3, I don't know of any modules
I think mainly because of license issue

you could decode mp3 to wav and process whatever you want to process
but to encode them back into mp3 is a problem
maybe you could use lame or bladeenc as a command line tool

or use ogg instead
http://www.andrewchatham.com/pyogg/
there are de/encoders freely available

this may also be interessting to you
http://pymedia.org/

hth, Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,270
Messages
2,571,352
Members
48,034
Latest member
BettinaArn

Latest Threads

Top