Something different in RC3/4 vs RC2 in declaration?

I upgrade an app from RC2 to RC4, following the instructions in the changeLog.
In that apps I have been used the speech-to-text plugin SpeechRecognition ( and it run perfectly.
As soon as I upgrade, II got this error (console from devices):

EXCEPTION: Uncaught (in promise): ReferenceError: SpeechRecognition is not defined

In my page I have:

declare var SpeechRecognition: any;
speechToText() {
    this.platform.ready().then(() => {
      this.recognition = new SpeechRecognition();
      this.recognition.lang = 'it-IT';
      this.recognition.onnomatch = (event => {
        this.showAlert('No match found.');
      this.recognition.onerror = (event => {
        this.showAlert('Error happens.');
      this.recognition.onresult = (event => {
        if (event.results.length > 0) {

Ionic Info:

Your system information:

ordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.4
Ionic CLI Version: 2.1.17
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.47
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v4.6.1
Xcode version: Not installed

My test device is a S4 mini, Android 4.4



I would update node

see []

To create Ionic 2 projects, you’ll need to install the latest version of the CLI and Cordova. Before you do that, you’ll need a recent version of Node.js. Download the installer for Node.js 6 or greater and then proceed to install the Ionic CLI and Cordova for native app development:



I just got Node 6.9.2, but same error…


I fixed it.

Declaration in package.json. config.xml, android.json was missing. In RC2 that doesn’t matter?!?

android.json: add

"org.apache.cordova.speech.speechrecognition": {
      "PACKAGE_NAME": "com.ionicframework.listaspesa928347"

config.xml: add (check the release in plugin.xml, I had 0.1.2)

<plugin name="org.apache.cordova.speech.speechrecognition" spec="0.1.2" />

package.json: add in cordovaPlugins the record:


PS: may be that only the update of android.json is actually a must.

Someone can made it works on IOS?

My ios code doesnt works =(

Same erro

Sorry. I didn’t code for IOS.

For me it is ok on Android.

My question is, It is possible to have a continuous recognition? Now it stops after few seconds.

I imagine it stops if no one is speaking… in my mind is a property of server side (google).
I try to speak for several seconds, but it doesn’t stop.

Yes it stops if no one is speaking.
But I’d like to have the recognition in the background. It is possible?

You have to implement this api:
(I didn’t, but the test in this page seems to be what you are looking for).

Thank you @pimol, I’ll take a look for google speech api.

I am trying to use speech recognition cordova plugin in ionic v1.
Can anyone here who know how to use in iOS?