title: Watson Speech to Text unable to transcode data stream audio/wav
body: <p>I am using the IBM Watson Speech to Text API:</p>
  
  <pre><code>var SpeechToTextV1 = require('watson-developer-cloud/speech-to-text/v1');
  var fs = require('fs');
  var request = require('request');
  
  var speech_to_text = new SpeechToTextV1({
    "username": "&lt;user name&gt;",
    "password": "&lt;password&gt;"
  });
  
  var recognizeStream = speech_to_text.createRecognizeStream();
  
  // request(wavfileURL).pipe(recognizeStream);
  // recognizeStream.on('results', function(err, res){
  //     console.dir(err)
  //     console.dir(res)
  //     if (res.results){
  //         console.dir(res.results)
  //     }
  //
  // });
  request.get(wavfileURL, function (err, res, buffer) {
    var streamer = require('streamifier');
    var params = {
      // From file
      audio: streamer.createReadStream(buffer) ,
      content_type: 'audio/wav; rate=44100'
    };
  
    speech_to_text.recognize(params, function(err, res) {
      debugger;
      if (err)
        console.log("ERR:",err);
      else {
        console.log("NOT ERR");
        console.log(JSON.stringify(res, null, 2));
        console.dir(res);
      }
    });
  });
  </code></pre>
  
  <p>I call it with the following WAV file <a href="https://s3.amazonaws.com/buzzy-audio/adam.ginsburg%40gmail.com/vNixvnC4Xscu8yZ98" rel="noreferrer">https://s3.amazonaws.com/buzzy-audio/adam.ginsburg%40gmail.com/vNixvnC4Xscu8yZ98</a></p>
  
  <p>And I get the following error:</p>
  
  <pre><code>&gt; ERR: { [Error: unable to transcode data stream audio/wav -&gt;
  &gt; audio/x-float-array ] I20170411-18:23:40.576(10)?   code: 400,
  &gt; I20170411-18:23:40.576(10)?   code_description: 'Bad Request',
  &gt; I20170411-18:23:40.577(10)?   error: 'unable to transcode data stream
  &gt; audio/wav -&gt; audio/x-float-array ' }
  </code></pre>
  
  <p>The content type sample rate seems correct:</p>
  
  <p><a href="https://i.stack.imgur.com/CM2jG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/CM2jG.png" alt="fileinfo"></a></p>
  
  <p>Any ideas please?</p>