Ibm cloud ibm watson从url文件将语音转换为文本

Ibm cloud ibm watson从url文件将语音转换为文本,ibm-cloud,ibm-watson,speech-to-text,Ibm Cloud,Ibm Watson,Speech To Text,您好,我正在使用ibm watson speech to text api将音频文件从url转换为文本 所以我使用这个curl命令 curl -s http://rabihshop.xyz/uploads/audio-file.flac | curl -X POST -u "apikey:rqK9u1060xmA8M6c9WQBFjGSI_xxxx_yyyyyIpIeJEuAnN" --header "Content-Type: audio/f

您好,我正在使用ibm watson speech to text api将音频文件从url转换为文本 所以我使用这个curl命令

 curl -s http://rabihshop.xyz/uploads/audio-file.flac 
    | curl -X POST -u "apikey:rqK9u1060xmA8M6c9WQBFjGSI_xxxx_yyyyyIpIeJEuAnN" 
    --header "Content-Type: audio/flac"
     --data-binary @- https://api.eu-de.speech-to-text.watson.cloud.ibm.com/instances/e8fbbfd5-9718-45a0-aa9e-b8b53bb258d9/v1/recognize
但它正在回归

{
   "error": "unable to transcode data stream audio/flac -> audio/x-float-array ",
   "code": 400,
   "code_description": "Bad Request"
}
如果我在官方网站上运行该命令,它会将语音从本地音频文件转换为文本

curl -X POST -u "apikey:{apikey}" \
--header "Content-Type: audio/flac" \
--data-binary @{path_to_file}audio-file.flac \
"{url}/v1/recognize"

您似乎使用
curl
下载音频并将其导入下一个命令。看起来您下载的内容和预期内容之间的编码不匹配。您需要确保下载文件的编码正确