locked
Speech (WAV) to text via POST RRS feed

  • Question

  • Hi,

    I've been trying to get this working, but the documentation seems insufficient.

    What I am trying to do is transcribe a WAV file, but the actual URL structure is confusing me.

    The docs mention that we should send our requests via https://speech.platform.bing.com/recognize, but no information is given on the way we should send our api key.

    I have tried this (any many more variations) to no avail:

    curl -X POST --verbose --max-time 180 --data-binary @queue.wav --header 'Content-Type: audio/wav; samplerate=8000; trustsourcerate=true' 'https://speech.platform.bing.com/recognize?subscription-key=mykey

    I would highly appreciate if someone could share a full working POST query to accomplish that.

    Saturday, May 30, 2015 5:31 PM

All replies

  • Check out this page (https://msdn.microsoft.com/library/mt656780.aspx).  You are missing the required parameters.

    Sunday, March 27, 2016 7:30 PM
  • I think the lack of important information in the API description. I used all the required parameters, but still get 403 Forbidden error. Any new suggestions? 
    Monday, April 4, 2016 9:34 AM
  • same here..Is this working? Could we please escalate this? It does not give any information on what the error is other than it being badly formed. Please let me know what I am sending wrong. The documentation does not help here.

    • Tue Apr 05 15:00:25 CDT 2016:DEBUG:>> "POST /recognize/query?Version=3.0&requestid=b2c95ede-97eb-4c88-81e4-80f32d6aee54&appID=D4D52672-91D7-4C74-8AD8-42B1D98141A5&format=json&locale=en-US&device.os=Linux&scenarios=ulm&subscription-key=HIDDENforPosting&instanceid=b2c95ede-97eb-4c88-81e4-80f32d6aee5 HTTP/1.1[\r][\n]"
    • Tue Apr 05 15:00:25 CDT 2016:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"
    • Tue Apr 05 15:00:25 CDT 2016:DEBUG:>> "Content-type: audio/wav; codec=?audio/wav?; samplerate=44100; trustsourcerate=false[\r][\n]"
    • Tue Apr 05 15:00:25 CDT 2016:DEBUG:>> "Content-Length: 0[\r][\n]"
    • Tue Apr 05 15:00:25 CDT 2016:DEBUG:>> "Host: speech.platform.bing.com[\r][\n]"
    • Tue Apr 05 15:00:25 CDT 2016:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
    • Tue Apr 05 15:00:25 CDT 2016:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
    • Tue Apr 05 15:00:25 CDT 2016:DEBUG:>> "[\r][\n]"
    • Tue Apr 05 15:00:25 CDT 2016:DEBUG:<< "HTTP/1.1 400 Bad Request[\r][\n]"
    • Tue Apr 05 15:00:25 CDT 2016:DEBUG:<< "Content-Type: text/html; charset=us-ascii[\r][\n]"
    • Tue Apr 05 15:00:25 CDT 2016:DEBUG:<< "Date: Tue, 05 Apr 2016 20:00:24 GMT[\r][\n]"
    • Tue Apr 05 15:00:25 CDT 2016:DEBUG:<< "Connection: close[\r][\n]"
    • Tue Apr 05 15:00:25 CDT 2016:DEBUG:<< "Content-Length: 311[\r][\n]"
    • Tue Apr 05 15:00:25 CDT 2016:DEBUG:<< "[\r][\n]"
    • Tue Apr 05 15:00:25 CDT 2016:DEBUG:<< "[\r][\n]"
    • Tue Apr 05 15:00:25 CDT 2016:DEBUG:<< "[\r][\n]"
    • Tue Apr 05 15:00:25 CDT 2016:DEBUG:<< "[\r][\n]"
    • Tue Apr 05 15:00:25 CDT 2016:DEBUG:<< "
    HTTP/1.1 400 Bad Request
    Content-Type: text/html; charset=us-ascii
    Date: Tue, 05 Apr 2016 19:49:38 GMT
    Connection: close
    Content-Length: 311

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
    <HTML><HEAD><TITLE>Bad Request</TITLE>
    <META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
    <BODY><h2>Bad Request</h2>
    <hr><p>HTTP Error 400. The request is badly formed.</p>
    </BODY></HTML>


    • Edited by alex_95 Tuesday, April 5, 2016 9:22 PM
    Tuesday, April 5, 2016 8:03 PM