Charles W Charles W - 21 days ago 7
Python Question

How to convert wav to flac from python?

I've just started using Python and am using the

PyAudio
and
Wave
modules to take sound from my microphone and convert it to a
.wav
file.

What I'm trying to do is now convert that
.wav
to a
.flac
. I've seen a few ways to do this which all involve installing a converter and placing it in my environmental PATH and calling it via
os.system
.

Are there any other ways to convert a
.wav
to a
.flac
via Python? The solution I'm looking for needs to work on both Windows and Linux.

Answer

May be you're looking for Python Audio Tools.

It seems PAT can do whatever you want.