-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
I have integrated S2T functionality in my application and it works at a URL X.
However when I open URL X in one more tab, my app runs into an endless loop of .onend()
recognition.onend = () => {
console.log("Speech recognition ended. Restarting recognition...");
isRecognitionRunningRef.current = false; // Set running flag to false when recognition ends
startRecognition(); // Restarting the recognition when speech ends
// By using the startRecognition() function here, we can ensure that the funcion is started only when the existing instance has stopped.
};

However as soon as I close the duplicate tab; it starts working as usual.
I just wanted to know an explanation for this behaviour but could not find anything in the docs.
All I found was: https://stackoverflow.com/questions/38261404/detect-if-another-browser-tab-is-using-speechrecognition
AbidKhairyAK
Metadata
Metadata
Assignees
Labels
No labels