如何从python将wav转换为flac? [英] How to convert wav to flac from python?
问题描述
我刚开始使用Python,并且正在使用PyAudio
和Wave
模块从麦克风获取声音并将其转换为.wav
文件.
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.
我现在想做的是将.wav
转换为.flac
.我已经看到了几种实现此目的的方法,这些方法都涉及安装转换器并将其放置在我的环境PATH中,然后通过os.system
调用它.
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
.
还有其他方法可以通过Python将.wav
转换为.flac
吗?我正在寻找的解决方案需要同时在Windows和Linux上运行.
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.
推荐答案
可能正在寻找 Python音频工具.
PAT似乎可以做任何您想做的事.
It seems PAT can do whatever you want.
这篇关于如何从python将wav转换为flac?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!