I'm trying to find a Python library that would take an audio file (e.g. .ogg, .wav) and convert it into mp3 for playback on a webpage.
Also, any thoughts on setting its quality for playback would be great.
Thank you.
Looks like PyMedia does this:
and some more info here on converting to various formats, whilst setting the bitrate:
http://pymedia.org/tut/recode_audio.html
e.g.
params= {
'id': acodec.getCodecId('mp3'),
'bitrate': r.bitrate,
'sample_rate': r.sample_rate,
'ext': 'mp3',
'channels': r.channels }
enc= acodec.Encoder( params )