audio = r.listen(source)
# for testing purposes, we're just using the default API key
#to use another API key, use `r.recognize_google(audio, key="GOOGLE_SPEECH_RECOGNITION_API_KEY")`# to use another API<
为此,我正在使用python-电-bot库和speech_recognition库与google引擎。我的问题是,用户发送的语音消息是.mp3,但是为了转录它们,我需要将它们转换为.wav。# open the file audio_data = r.record(source)
# recognize (con
我是Python.I的新手,我想使用Google文本到语音API,因为我使用了下面的代码,但是由于错误,我无法访问API。这是密码, """Synthesizes speech from the input string of text."""from google.cloud import texttospeech
client = tex