When I run the code below, as soon as the beep sounds to start recording the mic, I get “Network error”:
I have no idea what’s wrong here. I’ve:
- added the: cordova plugin + npm module correctly,
- granted permissions in the app for microphone
- tried connected to WIfi
- tried connected to 4g
- tried removing and re-adding the android platform to the project
- tried on 2 different phones (samsung s5 android 6 / sony xperia z5c android 7)
Any ideas? Thanks!
setupSpeechRecognition() {
this.speechRecognition.requestPermission().then(() => {
this.speechRecognition.startListening().subscribe(
(matches) => {
// matches here...
},
(onerror) => {
alert("Error: " + JSON.stringify(onerror));
}
);
},
() => {}
);
}