You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can we customize the microphone timeout for web speech api #137
In Android even if we set continuous flag to true, web speech api onend is called after a pause . This is working correctly in IOS . Can you please tell us a way where can customize the timeout being onend called?
I'm seeing Chrome throw a no-speech error if nothing is detected in 10 seconds. I don't see anything in the spec to set this timeout though, and if you want to keep it open for longer and try to restart the recognition instance on a no-speech catch, it errors because it's already been started.
I'm also seeing on iOS, it stays open and will not throw a no-speech error.
The use case here is to have an open mic for talking with an assistant. I would like it to stay open, even when an assistant is responding so the user can interrupt or respond to subsequent questions, and if it's automatically erroring after 10s, this cannot work.
Maybe there is another approach I'm missing?
Edit: I noticed this only happens the first time the recognition instance is started without detecting anything. The workaround I have right now is to catch the no-speech error, teardown the existing recognition instance and any handlers, then build a new one and start it. For some reason, the second one doesn't seem to be throwing any errors if you leave it open (just like how Safari handles it).
Activity
nicovalencia commentedon May 10, 2025
I'm seeing Chrome throw a
no-speecherror if nothing is detected in 10 seconds. I don't see anything in the spec to set this timeout though, and if you want to keep it open for longer and try to restart the recognition instance on ano-speechcatch, it errors because it's already been started.I'm also seeing on iOS, it stays open and will not throw a
no-speecherror.The use case here is to have an open mic for talking with an assistant. I would like it to stay open, even when an assistant is responding so the user can interrupt or respond to subsequent questions, and if it's automatically erroring after 10s, this cannot work.
Maybe there is another approach I'm missing?