javascript - Meteor Speech Recognition & Speech to Text on Mobile -


my goal here use speech text recognition meteor. know device keyboards have microphone button enables speech text, want avoid having users keyboard pop up.

to this: have been trying use webkitspeechrecognition used here. have working on desktop fine. when navigate localhost on phone, or build app on mobile phone (android galaxy s5), weird things start happen.

when navigating localhost: rather having finalized text appear on desktop, every iteration of recognition object thought. example: if said: 'hello stack'. get: 'hellohellohello stackhello stack'

when launching mobile app: microphone never turns on. none of console.logs come through , nothing ever happens.

here gist of code. , here relevant parts. else pretty standard meteor template.

    recognition = new webkitspeechrecognition();     recognition.continuous = true;     recognition.interimresults = true;     session.set('final_span','')     session.set('interim_span','')     final_transcript='';       recognition.onstart = function() {       session.set('listening',true)       recognizing = true;       console.log('started')     }      recognition.onresult = function(event) {      var interim_transcript = '';          (var = event.resultindex; < event.results.length; ++i) {            if (event.results[i].isfinal) {              final_transcript += event.results[i][0].transcript;            } else {              interim_transcript += event.results[i][0].transcript;            }          }          session.set('final_span',final_transcript)          session.set('interim_span',interim_transcript);     } 

i've looked packages solve me , didn't find worked.

tldr: insight on how speech recognition on mobile device using meteor.


Comments