Google Cloud Speech API命令

问题描述 投票:0回答:2

我正在从Qwiklabs学习Google Cloud Speech API。(链接到Qwiklabs Google Cloud Speech API:https://google.qwiklabs.com/focuses/588?parent=catalog

我不知道下面的命令在Google Cloud Shell中的作用。

curl -s -X POST -H "Content-Type: application/json" --data-binary @request.json \"https://speech.googleapis.com/v1/speech:recognize?key=${API_KEY}"

有人解释命令的每个部分以及命令的使用。

google-cloud-platform google-speech-api
2个回答
1
投票
Command Line Explanation

curl,-s,-x,-h,post,-数据二进制,内容类型被清楚地说明。


0
投票
curl是使您发出HTTP请求的命令。

在这种情况下,您正在与Cloud Speech API进行交互,向语音识别端点(POST / v1 / speech:recognize https://cloud.google.com/speech-to-text/docs/reference/rest/v1/speech/recognize)发出POST HTTP请求(curl -s -X POST),并设置内容类型( -H)在Header中向application / json请求,并使用配置和要识别的音频设置json主体(--data-binary)。

© www.soinside.com 2019 - 2024. All rights reserved.