flac 和 wav音频格式转换
程序员文章站
2022-05-28 15:17:28
...
参考:https://*.com/questions/23925494/how-to-convert-wav-to-flac-from-python
wav to flac:
import audiotools
filepath_wav = 'music.wav'
filepath_flac = filepath_wav.replace(".wav", ".flac")
audiotools.open(filepath_wav).convert(filepath_flac,
audiotools.FlacAudio)
flac to wav:
import audiotools
filepath_flac = 'music.flac'
filepath_wav = filepath_flac.replace(".flac", ".wav")
audiotools.open(filepath_flac).convert(filepath_wav,
audiotools.WaveAudio)
下一篇: 【向生活低头】将flv格式文件转为mp4