macdonst / SpeechRecognitionPlugin

W3C Web Speech API - Speech Recognition plugin for PhoneGap
MIT License
189 stars 95 forks source link

Error SpeechRecognition is not defined when using with angular4, cordova and android #104

Closed lokeshdaiya closed 4 years ago

lokeshdaiya commented 7 years ago
  1. I have installed your plugin 2, Added statement declare var SpeechRecognition:any;
  2. Initialized as below

    this.recognition = new SpeechRecognition();
    this.recognition.onresult = (event)=> {
      console.log(this.el.nativeElement.querySelectorAll(".content")[0]);
      this.el.nativeElement.querySelectorAll(".content")[0].innerText = event.results[0][0].transcript
    
    };

    I followed this thread https://forum.ionicframework.com/t/something-different-in-rc3-4-vs-rc2-in-declaration/73590 but still getting error

mathildebuenerd commented 6 years ago

Have you finally found a solution to resolve this error ? I have the same one with cordova and android. Thanks

macdonst commented 6 years ago

@lokeshdaiya what is the error you are getting?

arun02 commented 6 years ago

Error SpeechRecognition is not defined - have someone found a solution for this.

lokeshdaiya commented 4 years ago

I was getting that error on mobile only and reason was I have to give permission for recording for that app.