We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
self.request = Request(url, data = json.dumps(data), headers = {"Content-Type": "application/json"})
json.dumps(data)
The text was updated successfully, but these errors were encountered:
也碰到这个问题。 不过我改了代码。百度的post data规格改了。 data = { "format": "pcm", # "lan": self.language, "token": self.token, "len": len(audio_data.data), # "rate": audio_data.rate, "rate": 8000, "channel" : 1, "speech": base64.b64encode(audio_data.data), "cuid": '93489083242', }
不过出现另外一个问题 with sr.WavFile(WAV_FILE) as source: audio = r.record(source) # read the entire WAV file 读不出数据!!! audio为空!!
Sorry, something went wrong.
No branches or pull requests
self.request = Request(url, data = json.dumps(data), headers = {"Content-Type": "application/json"})
json.dumps(data)
The text was updated successfully, but these errors were encountered: