0
votes

I'm following example code from IBM speech-to-text Getting started tutorial to transcribe a "flac" audio file downloaded from the same tutorial. However I receive this error {"code":401, "error":"Unauthorized"} upon running the curl command in Windows cmd.

I'm copying apikey and url from IBM speech-to-text service interface. Using dallas server therefore url includes stream.watsonplatform.net. The audio file is in the same directory where curl is being executed therefore just file name is written in the following code snippet without @ and file path

curl -X POST -u "apikey:{Actual Api key}"\
--header "Content-Type: audio/flac"\
--data-binary audio-file.flac\
"https://stream.watsonplatform.net/speech-to-text/api/v1/recognize"

What am I doing wrong?

1

1 Answers

1
votes

Your syntax is correct. The credentials are probably not correct, please check that the apikey is correct and that it corresponds to the speech-to-text service for the Dallas region.