1

I'm already aware of the post 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.

2 Answers2

0

This is potentially a duplicate of: why javascript Speech Recognition api is not working without internet?

The W3CSpeech API (link to demo) is still in its very early stages of being drafted / implemented and is currently only supported for online applications on Chrome only. This is because it needs a server-based recognition engine. I believe this is what you are using and is the future non 3rd party cross-browser solution to this. Please see caniuse for browser support.

Therefore what you are wanting (with your requirement) is currently not possible.

Marcus
  • 1,880
  • 20
  • 27
-1

there are not many choises you have when it comes to offline speech recogntion. take a look at deepspeech which is offline speech recogntion engine in python.

  • *"I have no intentions of using 3d party software so please don't suggest any"* Did you see this part in the question? – Dharman Aug 17 '19 at 09:57