[英]“error”: { “code”: 400, “message”: “RecognitionAudio not set.”, “status”: “INVALID_ARGUMENT” } }
I want to send request http POST to Cloud Speech API with editor Cloud Shell through this command → 我想通过此命令使用编辑器Cloud Shell将请求http POST发送到Cloud Speech API →
curl -s -X POST -H "Content-Type: application/json" --data-binary @request.json \
"https://speech.googleapis.com/v1/speech:recognize?key=AIzaSyBZMZwv1-WLSMG-OBJiaDQ6Q9oYEff5vEo"
I am following the official tutorial https://codelabs.developers.google.com/codelabs/cloud-speech-intro/index.html?index=..%2F..index#2 , but when I run the command in the editor, the response is this → 我正在遵循官方教程https://codelabs.developers.google.com/codelabs/cloud-speech-intro/index.html?index=..%2F..index#2 ,但是当我在编辑,回应是这个→
{
"error": {
"code": 400,
"message": "RecognitionAudio not set.",
"status": "INVALID_ARGUMENT"
}
}
The code that I wrote in " request.json " file is this one → 我在“ request.json ”文件中编写的代码是这个→
{
"config": {
"encoding":"FLAC",
"languageCode": "en-US",
},
"audio": {
"uri":"gs://cloud-samples-tests/speech/brooklyn.flac"
}
}
我在执行curl命令的文件夹中没有request.json
文件时收到您提到的错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.