2

I want to get voice recorded during speech recognition. Based on confidence of recognized speech, the program will save or deny user's speech.

To do above I have two choices:

  1. Record user's voice from browser and send to Node JS server. Then post voice to Google Speech API and get result. Based on confidence level do action.

  2. Recognize and record user speech at browser. If recognition confidence level is good, then send voice to Node JS server to save it.

Second way seems to be good, but how can I get audio of user's speech?

Note: Speech will be continuous and every part of text will last about one minute.

Environment: Google Chrome v49, HTML5 (at browser side). Node JS (at server side)

Thanks for your help.

Edit #1 (Based on @raju's comment):

I have tried following code

var recognition = new webkitSpeechRecognition();
recognition.continuous = true;
recognition.interimResults = true;
recognition.lang = "tr-TR";
recognition.onresult = function(event) { 
    console.log(event) 
}
recognition.start();

It works, but it only returns results of speech recognition. I want the raw sound data too. I looked up for different events and their parameters of "recognition" object, but none of them meets my needs. Is there any suggestions?

  • Pure code requests are off topic in stackoverflow. Please share What have you tried so far? Where you are stuck – Raju Mar 13 '16 at 00:10
  • Possible duplicate of [Speech recognition and getUserMedia](http://stackoverflow.com/questions/21093398/speech-recognition-and-getusermedia) – Nikolay Shmyrev Mar 13 '16 at 19:20

0 Answers0