我管理了“概览教程”:https://cloud.google.com/speech/docs/getting-started 然后我尝试使用我自己的音频文件。我上传了一个采样率为16000Hz的.flac文件。Google云语音识别“INVALID_ARGUMENT”
我只是改变了sync-request.json
文件下面托管在谷歌云存储我自己的音频文件(gs://my-bucket/test4.flac
)
{
"config": {
"encoding":"flac",
"sample_rate": 16000
},
"audio": {
"uri":"gs://my-bucket/test4.flac"
}
}
文件是公认的,但该请求返回“INVALID_ARGUMENT”错误
{
"error": {
"code": 400,
"message": "Unable to recognize speech, code=-73541, possible error in recognition config. Please correct the config and retry the request.",
"status": "INVALID_ARGUMENT"
}
}