Closed shareefalis closed 6 months ago
@shareefalis Thank you for using JS Speech SDK, and writing this issue up. Which region are you seeing this behavior? Could you try with eastus or eastus2?
Hello Glenn, we are seeing this behavior on eastus2
Hello Glenn, we are seeing this behavior on eastus2
It seems strange that disabling http2 websocket connections affects an error stating that "The number of parallel requests exceeded the number of allowed concurrent transcriptions." Could you describe what happens to the existing recognizer instance when you stop your app's engine?
We assign a undefined value if the engine is stopped and we recreate the engine in start by a new SpeechRecognizer
this.setState(SpeechToTextClientStates.STOPPING_STATE);
this.recognizer.stopContinuousRecognitionAsync(
() => {
this.setState(SpeechToTextClientStates.STOPPED_STATE);
this.recognizer = undefined;
},
(err: string) => {
this.setState(SpeechToTextClientStates.STOPPED_STATE, new Error(err));
this.recognizer = undefined;
},
);
Try calling this.recognizer.close() before setting it to undefined.
I tried it. it works now.. Strange to why it is happening now with the new behavior
I tried it. it works now.. Strange to why it is happening now with the new behavior
That close() call lets the backend service know that the client is ending the recognition session. Without it, it takes a few minutes (or more) of inactivity before the service gives up and closes the websocket.
What happened?
On Firefox with WebSocket HTTP/2 enabled, our web app encounters errors in the streaming Speech-to-Text (STT) feature when the engine is started and stopped three times. Attempting to start the engine again results in a library error displayed in the console. Disabling HTTP/2 resolves this issue, restoring the app's functionality.
We prevent user error by enforcing a requirement for the user to wait until the engine reports a 'started' or 'stopped' state before allowing them to start or stop the engine.
Version
1.34.0
What browser/platform are you seeing the problem on?
No response
Relevant log output