I'm already aware of the post [how to convert getUsermedia audio stream into a blob or buffer?](https://stackoverflow.com/questions/30547322/how-to-convert-getusermedia-audio-stream-into-a-blob-or-buffer) but it did not have the answer I'm looking for.
I'm making an assistant app that uses voice commands. Currently, it takes commands using webkitSpeechRecognition, which works great on Chrome os. The problem is it's online only and my app is supposed to work offline. Here's what I'm looking for.

```
function ConvertAudioStreamToText(stream) {
  var convertedStream = null;

  // code to convert getUserMedia audio stream to text

  return convertedStream;
}

navigator.mediaDevices.getUserMedia({audio: true}, function(stream) {
  var convertedStream = ConvertAudioStreamToText(stream);
}, function(error) {console.log("Error:", error);});

```

Also, I have no intentions of using 3d party software so please don't suggest any. Any help is appreciated.