Python Forum

Full Version: audio read/write library
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
does anyone know of a good audio library that could let my code read and write audio files in flac and mp3 (vbr) formats, along with the ability to discover and configure number of channels, number of bits per sample, byte order (where applicable), signedness (where applicable), sample rate, etc.
that library is not a read/write library. it's a front-end to running ffmpeg. i need operations/methods like opening a file, setting parameters on output file, reading/writing samples of audio. samples would be a list/tuple of ints, or a list/tuple of those for many samples at once. stuff like that.
I have used https://pypi.org/project/pocketsphinx/ may or may not fit your needs.
pocketsphinx is for speech recognition. what i am doing is reading in an audio waveform which is a stream of sample tuples, applying some arithmetic changes, and writing the results back out.
it refers to "AVbin" which i don't find in pip search. so maybe that's a binary it provides an interface to.
I have no clue, you'll need to investigate.