参考:https://stackoverflow.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)