-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web speech Api not working in chrome browser in android device #25794
Comments
@janaki112 Can you share what Chrome version you're using, both on Desktop and Mobile? I just tried https://mdn.github.io/dom-examples/web-speech-api/speech-color-changer/ in Chrome 132, and the example was working as expected. |
Hi @caugner , I'm using OnePlus Pad Go tablet in chrome browser , I integrated webspeech in angular and started speech detection , mic is turning off even before I stop , but the same implementation is working windows laptop , macbooks and ipads. Can you check the behaviour - https://www.google.com/intl/en/chrome/demos/speech.html . Below attached file contains chrome and android version in the code. If I give a pause web speech microphone is stopping but whereas in other devices it's not stopping. In desktop - Chrome Version 132.0.6834.111 (Official Build) (arm64) And I found an issue in stack overflow -https://stackoverflow.com/questions/42134899/webkitspeechrecognition-on-android-chrome and work around provided here in the stackoverflow link it's not working. const { webkitSpeechRecognition, SpeechRecognition } = window as any;
if ('webkitSpeechRecognition' in window || 'SpeechRecognition' in window) {
this.recognition = new (webkitSpeechRecognition || SpeechRecognition)();
this.recognition.lang = 'en-US';
this.recognition.continuous = true;
this.recognition.interimResults = true;
this.recognition.mode="ondevice-preferred";
this.recognition.onstart = (event: any) => {
console.log(this.recognition);
};
this.recognition.onerror=(event: any) => {
console.log("error",event);
}
this.recognition.onnomatch = (event: any) => {
console.log("no match",event);
}
this.recognition.onspeechend = (event: any) => {
console.log("speech end",event);
}
this.recognition.onspeechstart=(event:any)=>{
console.log(event,"speech started");
};
this.recognition.onresult = (event: any) => {
const data :any= Array.from(event.results);
console.log(data);
console.log(data.length);
const transcript=(data[data.length-1][0].transcript);
console.log(transcript);
};
this.recognition.onend = (event:any) => {
// this.startListening();
console.log("end",event);
event.results=[];
};
} else {
console.error('SpeechRecognition API not supported in this browser.');
} |
@janaki112 Thank you, can you check if this Chromium issue sounds like the issue you're experiencing, and if Web Speech without Meanwhile, I will transfer this over to BCD. |
Yeah @caugner , it's the same issue , without continuous means by setting it to false, If I set continuous to false , microphone is turning off after a pause while I was speaking. |
Hey @caugner ,any update on this? |
Thanks for your patience, I opened #25878 to fix this. |
The change should be reflected in the browser compatibility tables on MDN within the next hours. Please note that this doesn't mean that the bug is fixed in Chrome Android. That is tracked in Chrome's bug tracker: https://issues.chromium.org/issues/41297427 We have no influence on when the issue will actually be fixed, but please do let us know when that happens, so that we can update the BCD table again. |
What information was incorrect, unhelpful, or incomplete?
In android chrome browser , after turning on the microphone for detection , after 2 seconds or even less microphone is switching off and even after turning on , it's not working as expected. It's happening in the demo page also https://www.google.com/intl/en/chrome/demos/speech.html
Only in android chrome this issue is coming . Ios , mac , windows every where else it's working fine.
What did you expect to see?
Seamlessly detection should happen in the android device chrome browser .
Do you have any supporting links, references, or citations?
https://www.google.com/intl/en/chrome/demos/speech.html
Do you have anything more you want to share?
No response
The text was updated successfully, but these errors were encountered: