假设我有:
text = "Hello this is content that I need to convert to 16bit PCM WAV file with a sampling rate of 8kHz, Hello this is content that I need to convert to 16bit PCM WAV file with a sampling rate of 8kHz, Hello this is content that I need to convert to 16bit PCM WAV file with a sampling rate of 8kHz, "
我有将其转换为mp3或.wav的代码,但是如何设置其他参数以将其保存为16bit PCM WAV文件,采样率为8kHz。谢谢
from gtts import gTTS
text = "........."
language = 'en'
myobj = gTTS(text=mytext, lang=language, slow=False)
myobj.save("data.mp3")