Watson Speech to text could not resolve host

I'm trying to use the ibm watson speech to text service. Using Curl and the appropriate credentials i'm getting an error and don't understand why. I'm new to this so i need some help

I'm using this command-lines to get the text out of an audio file:

 curl -u username:password -X POST \ --header "Content-Type: audio/flac" \ --header "Transfer-Encoding: chunked" \ --data-binary @/tmp/0001.flac \ "https://stream.watsonplatform.net/speech-to-text/api/v1/recognize?continuous=true"

and i'm getting this error:

curl: (6) Could not resolve host: --header curl: (6) Could not resolve host: Content-Type curl: (6) Could not resolve host: --header curl: (6) Could not resolve host: Transfer-Encoding curl: (6) Could not resolve host: --data-binary curl: (6) Could not resolve host: curl: (1) Protocol https not supported or disabled in libcurl

does anybody know what i'm doing wrong?

Upvotes: 0

Views: 1400

Answers (1)

German Attanasio
German Attanasio

Reputation: 23663

Remove the / from the curl command, we use them in the API Reference to better display the curl commands but they don't work in Windows.

curl -u username:password -X POST  
--header "Content-Type: audio/flac"  
--header "Transfer-Encoding: chunked"
--data-binary @/tmp/0001.flac 
"https://stream.watsonplatform.net/speech-to-text/api/v1/recognize?continuous=true"

The command will work in unix based system like Ubuntu or Mac.

Upvotes: 2

Related Questions