0

我在Cordova/Ionic中使用該插件進行語音識別。 https://github.com/macdonst/SpeechRecognitionPlugin科爾多瓦的語音識別插件只偵聽一次

承認只有當我打開應用程序的第一次(安卓)

我沒有看到任何錯誤的調試工作一次我。 recognition.start()再次發射,我聽到聲音(開始&停止)。 然而,onresult事件只是第一次觸發。

$scope.record = function(){  
    recognition = new SpeechRecognition(options); 
     recognition.onresult = function(event) { 
      console.log("On Result called"); 
      if (event.results.length > 0) { 
       console.log(event.results[0][0].transcript); 
      }else{ 
       console.log("no word"); 
      } 
     }; 
     recognition.start(); 
    } 

對此的任何建議。

+0

有一個懸而未決的問題。 https://github.com/macdonst/SpeechRecognitionPlugin/issues/50當我有一些時間的時候,會試着去關注它。 – jcesarmobile

+0

我上週修復了它,讓我知道你是否還有問題 – jcesarmobile

回答

0

NG使用語音識別指令,你不需要安裝任何插件,科爾多瓦你的混合應用:

ng-speech-recognition