In JavaScript we use recorder.js to capture microphone input, down sample it to 16kHz, encode it as a WAV file and get a blob.
Next, we obtain the raw blob bytes via a FileReader onload() callback and then use an XMLHttpRequest to send() the raw bytes to Bing.
The XMLHttpRequest includes the headers:
'Ocp-Apim-Subscription-Key' : 'xxxxxx'
'Content-Type' : 'audio/wav; codec=audio/pcm; samplerate=16000'
A sample blob size is 62456 bytes.

FireFox network tracing shows 2 interactions. The first is
 Request URL: <https://speech.platform.bing.com/speech/recognition/interactive/cognitiveservices/v1?language=en-US&format=simple>
 Request Method: OPTIONS
and the second
 Request URL:<https://speech.platform.bing.com/speech/recognition/interactive/cognitiveservices/v1?language=en-US&format=simple>
 Request Method: POST
 content-length: 94476

However, I keep getting the following reply
 {"RecognitionStatus":"InitialSilenceTimeout","Offset":29000000,"Duration":0}

FWIW, any idea why the source blob size of 62456 would result in content-length: 94476?

The same raw blob bytes are processed by Amazon Lex properly. 

Is there any JavaScript RESTful example?
Many thanks.

/--------------------------------------------------------------
After putting together the test case below I also tried the following without success.

```
console.log("Send to BING blob");
var self = this;
console.log(blob);
var msUrl = 'https://speech.platform.bing.com/speech/recognition/interactive/cognitiveservices/v1';
msUrl += '?language=en-US';
msUrl += '&format=simple';
console.log(msUrl);
var xhr = new XMLHttpRequest();
xhr.onload = function(evt) { console.log('onload', xhr, evt);};
xhr.open('POST', msUrl, true);
xhr.setRequestHeader('Accept', 'application/json;text/xml');
xhr.setRequestHeader('Ocp-Apim-Subscription-Key', 'xxx');
var bingContentType = 'audio/wav; codec=audio/pcm; samplerate=16000';
xhr.setRequestHeader('Content-Type', bingContentType);
xhr.send(blob);

```