MS Bing Speech API:请求超时(> 14000 ms)

时间:2016-12-12 08:23:42

标签: curl speech-recognition speech-to-text bing-api microsoft-cognitive

我正在尝试向Bing Speech API发出一个speech2text请求,但我得到了

HTTP/1.1 408 Request timed out (> 14000 ms)

错误

我的curl命令如下:

curl -v -X POST" https://speech.platform.bing.com/recognize?scenarios=smd&appid=D4D52672-91D7-4C74-8AD8-42B1D98141A5&locale=en-US&device.os=your_device_os&version=3.0&format=json&instanceid=my-instanceid&requestid=my-request-id" -H'授权:Bearer my-token' -H'内容类型:audio / wav;编解码器="音频/ PCM&#34 ;;采样率= 16000' --data-binary @ whatstheweatherlike.wav

我试图上传的

文件是

https://github.com/Microsoft/BotBuilder-Samples/blob/master/Node/intelligence-SpeechToText/audio/whatstheweatherlike.wav

任何想法可能出错?

2 个答案:

答案 0 :(得分:0)

您有一个指向WAV文件的GitHub页面的链接,而不是WAV文件本身。请改用https://raw.githubusercontent.com/Microsoft/BotBuilder-Samples/master/Node/intelligence-SpeechToText/audio/whatstheweatherlike.wav

答案 1 :(得分:0)

似乎这与cUrl有关,因为我在nodejs中实现了相同的逻辑,并且它工作正常。