Skip to content

Fix #599: STT killed mid-call — orphan watchdog timeout too aggressive - #600

Merged
joelteply merged 1 commit into
mainfrom
fix/stt-orphan-watchdog
Mar 30, 2026
Merged

joelteply merged 1 commit into
mainfrom
fix/stt-orphan-watchdog

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Root Cause

Whisper STT was being shut down 60 seconds into every live call. The orphan watchdog saw 15 sessions with stable count and assumed they were orphaned.

Log evidence:

02:55:43 — Whisper model loaded (407MB)
02:57:44 — "28 sessions stuck for 60s — orphaned, force-resetting"
02:57:44 — "STT 'whisper' shut down", "Models unloaded (~407MB freed)"

Fix

Increased orphan timeout from 60s to 600s (10 minutes). Live calls naturally have stable session counts — personas join and stay for the duration.

Test

  • cargo build --release passes
  • Deploy, join live call, verify subtitles appear after speaking

… sessions

Live calls have 15 personas that join and stay — session count is stable.
The watchdog saw 'count unchanged for 60s' and killed all audio models
including Whisper. Increased orphan timeout to 10 minutes. The real fix
is checking for active calls, not just count stability.
Copilot AI review requested due to automatic review settings March 30, 2026 03:16
@joelteply
joelteply merged commit 96f10f6 into main Mar 30, 2026
4 of 6 checks passed
@joelteply
joelteply deleted the fix/stt-orphan-watchdog branch March 30, 2026 03:17

Copilot AI left a comment

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.

Pull request overview

Adjusts the live-audio “orphan session” watchdog so it doesn’t unload STT/TTS models during legitimate long-running calls (addressing #599 in continuum-core’s live audio lifecycle management).

Changes:

  • Increased orphan timeout from 60s to 600s to avoid shutting down Whisper mid-call.
  • Increased orphan polling interval from 15s to 30s.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

let lifecycle = Arc::clone(self);
const ORPHAN_CHECK_INTERVAL_SECS: u64 = 15;
const ORPHAN_TIMEOUT_SECS: u64 = 60; // 1 minute without change = orphaned
const ORPHAN_CHECK_INTERVAL_SECS: u64 = 30;

Copilot AI Mar 30, 2026

Copy link

Choose a reason for hiding this comment

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

This PR metadata says it only increases the orphan timeout, but this change also doubles the orphan check interval (15s → 30s). If intentional, it should be called out in the PR description and/or justified here since it affects how quickly true orphans are detected.

Copilot uses AI. Check for mistakes.
const ORPHAN_CHECK_INTERVAL_SECS: u64 = 15;
const ORPHAN_TIMEOUT_SECS: u64 = 60; // 1 minute without change = orphaned
const ORPHAN_CHECK_INTERVAL_SECS: u64 = 30;
const ORPHAN_TIMEOUT_SECS: u64 = 600; // 10 minutes — live calls have stable session counts for the entire call duration. 60s was killing Whisper mid-conversation.

Copilot AI Mar 30, 2026

Copy link

Choose a reason for hiding this comment

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

The doc comment above spawn_orphan_watchdog still says the orphan timeout is 60s, but the code now uses 600s. Update the comment (or remove the hard-coded number) so it stays accurate.

Copilot uses AI. Check for mistakes.
joelteply added a commit that referenced this pull request Mar 30, 2026
…diagnostic logging

Three fixes to restore live mode speech-to-text:
1. Set ORT_DYLIB_PATH in start-workers.sh (ONNX Runtime wasn't found)
2. Use spawn_blocking for VAD init (ORT deadlocked in async context)
3. Added diagnostic logging throughout listen_and_transcribe pipeline
4. Orphan watchdog timeout 60s → 600s (PR #600, already merged)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants