简体   繁体   English

“错误”:{“代码”:400,“消息”:“ RecognitionAudio未设置。”,“状态”:“ INVALID_ARGUMENT”}}

[英]“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.

相关问题 Simba][SpannerJDBCDriver](100300) 来自服务器的错误消息:INVALID_ARGUMENT:不支持位置参数 - Simba][SpannerJDBCDriver](100300) Error message from server: INVALID_ARGUMENT: Positional parameters are not supported 跟进意图更新时出现Dialogflow INVALID_ARGUMENT错误 - Dialogflow INVALID_ARGUMENT error on followup intent update Unity 广告返回 INVALID_ARGUMENT - Unity ads returns INVALID_ARGUMENT 如何在响应对象中设置状态代码 400 - Ho to set status code 400 in response object 服务器错误,状态代码:400,错误代码:100005,消息:您已超出组织的 memory 限制 - Server error, status code: 400, error code: 100005, message: You have exceeded your organization's memory limit gcloud app deploy 命令错误 INVALID_ARGUMENT:此运行时需要 WEB-INF/appengine-web.xml - gcloud app deploy command error INVALID_ARGUMENT: WEB-INF/appengine-web.xml is required for this runtime 预检的响应具有无效的HTTP状态代码400 - Response for preflight has invalid HTTP status code 400 Google Dataflow / Dataprep Shuffle键太大(INVALID_ARGUMENT) - Google Dataflow / Dataprep Shuffle key too large (INVALID_ARGUMENT) 将long []更改为Set。 错误消息:Collections类型中的方法addAll不适用于自变量(设置 <Long> , 长[]) - Changing a long[] into a Set. Error message: The method addAll in the type Collections is not applicable for the arguments (Set<Long>, long[]) 使用 IamCredentialsClient 对 Blob 进行签名时的 INVALID_ARGUMENT 响应 - INVALID_ARGUMENT response when signingBlob using IamCredentialsClient
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM