So I have this code in Google Chrome:
var recognition = null;
$(document).ready(function(){
recognition = new webkitSpeechRecognition();
recognition.continuous = true;
recognition.interimResults = true;
recognition.onresult = function(event){
// delve into words detected results & get the latest
// total results detected
var resultsLength = event.results.length;
// get length of latest results
var ArrayLength = event.results[resultsLength-1].length;
// get last word detected
var saidWord = event.results[resultsLength-1][ArrayLength-1].transcript;
console.log("***"+saidWord+",");
}
//don't forget to start the recognition!
recognition.start();
});
When I count from 1 to 10, I see this in the console:
***012345678910,
When I say "two ... seven", I see this in the console:
***27,
When I say "twenty-seven", I see this in the console:
***27,
Why are the detected numbers not being delimited?
For the above three cases, I would like to see:
***0,1,2,3,4,5,6,7,8,9,10,
***2,7
***27,
I'm trying to detect numbers in continuous speech here...