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

fix Google STT handling of session timeouts #1337

Merged
merged 6 commits into from
Jan 7, 2025
Merged

fix Google STT handling of session timeouts #1337

merged 6 commits into from
Jan 7, 2025

Conversation

davidzhao
Copy link
Member

@davidzhao davidzhao commented Jan 6, 2025

also reduces initial retry delay with STT/LLM/TTS connection errors

fixes #1258

also reduces initial retry delay with STT connection errors
Copy link

changeset-bot bot commented Jan 6, 2025

🦋 Changeset detected

Latest commit: e973c65

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
livekit-plugins-azure Patch
livekit-agents Patch
livekit-plugins-google Patch

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

@jayeshp19 jayeshp19 merged commit 0d9875e into main Jan 7, 2025
14 checks passed
@jayeshp19 jayeshp19 deleted the fix-google-stt branch January 7, 2025 08:13
@github-actions github-actions bot mentioned this pull request Jan 6, 2025
@@ -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
Copy link
Member

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")
Copy link
Member

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

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

Successfully merging this pull request may close these issues.

Google STT times out at 5 minutes and crashes agent
3 participants