Ionic Cordova Speech Recognition working with android version 8 or lower. But whenever I am running running the app in the android emulator with android version 9 or higher google tap to speak is not showing. This is happening also in real device.
Emulator Tap To Speak:
Also sharing the speech recognition code for better understanding:
getPermission() {
this.speechRecognition.hasPermission().then((hasPermission: boolean) => {
if (!hasPermission) {
this.speechRecognition.requestPermission();
}
});
}
startListening() {
let options = {
showPopup: true,
language: "en-US",
};
this.speechRecognition.startListening(options).subscribe((matches) => {
this.matches = matches;
this.cd.detectChanges();
});
this.isRecording = true;
}
stopListening() {
this.speechRecognition.stopListening().then(() => {
this.isRecording = false;
});
}
1 post - 1 participant