Skip to content

increase the stt inactivity timeout threshold due to the instability of audio bytes on some 3rd devices#3659

Merged
beastoin merged 1 commit into
mainfrom
scx9n_revives
Dec 8, 2025
Merged

increase the stt inactivity timeout threshold due to the instability of audio bytes on some 3rd devices#3659
beastoin merged 1 commit into
mainfrom
scx9n_revives

Conversation

@beastoin
Copy link
Copy Markdown
Collaborator

@beastoin beastoin commented Dec 8, 2025

No description provided.

@beastoin beastoin merged commit cf97b0a into main Dec 8, 2025
1 check passed
@beastoin beastoin deleted the scx9n_revives branch December 8, 2025 17:10
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request increases the STT inactivity timeout from 30 to 90 seconds to handle audio instability from some third-party devices. While the change is reasonable, I've suggested making this timeout value configurable through an environment variable. This will improve maintainability by allowing future adjustments without code changes, which is a common pattern in this codebase.

# Heart beat
started_at = time.time()
inactivity_timeout_seconds = 30
inactivity_timeout_seconds = 90
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The inactivity timeout is hardcoded. It's better to make this value configurable via an environment variable. This allows for easier adjustments in different environments (development, staging, production) or for future tuning without requiring a code change and redeployment. This is consistent with how other timeouts and configuration values are handled in the codebase (e.g., in backend/utils/other/timeout.py).

Suggested change
inactivity_timeout_seconds = 90
inactivity_timeout_seconds = int(os.getenv("STT_INACTIVITY_TIMEOUT_SECONDS", 90))

Glucksberg pushed a commit to Glucksberg/omi-local that referenced this pull request Apr 28, 2026
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.

1 participant