用于Google Speech API的异步请求的curl命令

问题描述:

既然Google语音API不再处于测试阶段,那么我的curl命令需要更新,但语音文档:longrunningrecognize会显示404。我需要使异步请求,因为我的文件超过一分钟。以前,我用这个:用于Google Speech API的异步请求的curl命令

 curl -s -k -H "Content-Type: application/json" \-H "Authorization: Bearer xxxxxxx" \POST https://speech.googleapis.com/v1beta1/speech:asyncrecognize \-d @sync-request.json 

现在想来替代

curl -s -k -H "Content-Type: application/json" \-H "Authorization: Bearer xxxxxxx" \POST https://speech.googleapis.com/v1/speech:longrunningrecognize \-d @sync-request.json 

,但我得到的错误信息:错误404(未找到)!1

什么是正确的卷曲我现在应该使用命令?

试试用这个吧!这种格式一直在为我工作。

curl -i -H "Content-Type: application/json" \ 
    -H "Authorization: Bearer AUTHORIZATIONKEY" \ 
https://speech.googleapis.com/v1/speech:longrunningrecognize \ 
    -d @sync-request.json