【发布时间】:2020-08-06 00:14:51
【问题描述】:
我正在将 .opus 音频文件传递给 google 的语音转文本 api 以进行转录。我正在使用以下配置:
- 编码 = enums.RecognitionConfig.AudioEncoding.OGG_OPUS
- language_code = "en-US"
- sample_rate_hertz = 16000
我收到以下错误:
google.api_core.exceptions.GoogleAPICallError: None Unable to recognize speech, possible error in encoding or channel config. Please correct the config and retry the request.
我尝试了其他编码,如 FLAC 和 LINEAR16,并得到 None 作为输出。
opus 音频文件是否需要额外的配置字段以及配置文件应该是什么样子?
【问题讨论】:
标签: speech-to-text google-speech-api google-cloud-speech opus google-speech-to-text-api