CURL url not specified

I am following this tutorial to set up text service speech on IBM Bluemix: https://www.ibm.com/watson/developercloud/doc/speech-to-text/tutorial.shtml

I installed and tested the prerequisites, but somehow I get an error when I try to enter:

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

      

I got the following error:

curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information

      

I tested the username and password when I accessed the url directly and it worked. The path I entered for the audio file is also correct as I just copied it.

Does anyone know how to fix this? Thank you in advance!:)

+3


source to share


2 answers


You are missing screens for new lines. Try something like this:

curl -X POST -u "myusername":"mypassword" \
--header "Content-Type: audio/flac" \
--data-binary "@audio-file1.flac" \
--data-binary "@audio-file2.flac" \
"https://stream.watsonplatform.net/speech-to-text/api/v1/recognize?timestamps=true&word_alternatives_threshold=0.9&keywords=%22colorado%22%2C%22tornado%22%2C%22tornadoes%22&keywords_threshold=0.5&continuous=true"

      



Sample audio files

+3


source


Ok, I forgot the double quotes when I entered the path. But now it returns this HTML:

<HTML><HEAD>
<TITLE>Network Error</TITLE>
</HEAD>
<BODY>
<FONT face="Helvetica">
<big><strong></strong></big><BR>
</FONT>
<blockquote>
<TABLE border=0 cellPadding=1 width="80%">
<TR><TD>
<FONT face="Helvetica">
<big>Network Error (tcp_error)</big>
<BR>
<BR>
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
A communication error occurred: "Connection refused"
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica" SIZE=2>
<BR>
For assistance, contact your network support team.<br><br>Your request was categorized by Blue Coat Web Filter as 'Technology/Internet'. <br>If you wish to question or dispute this result, please click <a href="http://sitereview.bluecoat.com/sitereview.jsp?referrer=136&url=http://stream.watsonplatform.net/speech-to-text/api/v1/recognize?continuous=true">here</a>.
</FONT>
</TD></TR>
</TABLE>
</blockquote>
</FONT>
</BODY></HTML>

      



Thanks in advance!

0


source







All Articles