Skip to content
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

Cannot have multiple speech-to-text listeners #115

Open
ceyxasm opened this issue Oct 3, 2024 · 0 comments
Open

Cannot have multiple speech-to-text listeners #115

ceyxasm opened this issue Oct 3, 2024 · 0 comments

Comments

@ceyxasm
Copy link

ceyxasm commented Oct 3, 2024

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. => {
      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.
    };

image
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant