-
Notifications
You must be signed in to change notification settings - Fork 534
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
fix Google STT handling of session timeouts #1337
Conversation
also reduces initial retry delay with STT connection errors
🦋 Changeset detectedLatest commit: e973c65 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -44,6 +45,10 @@ | |||
LgType = Union[SpeechLanguages, str] | |||
LanguageCode = Union[LgType, List[LgType]] | |||
|
|||
# Google STT has a timeout of 5 mins, we'll attempt to restart the session | |||
# before that timeout is reached | |||
_max_session_duration = 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like 4 seconds to me
time.time() - self._session_connected_at | ||
> _max_session_duration | ||
): | ||
logger.debug("restarting session due to timeout") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary log? Should be handled seamlessly IMO
also reduces initial retry delay with STT/LLM/TTS connection errors
fixes #1258