personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Treat marginal VAD speech (<5s) with no transcription as silence

When VAD detects a small amount of speech but the STT backend returns
zero statements, log it as marginal detection instead of raising a
RuntimeError. This avoids noisy error alerts for segments that are
just ambient noise with brief blips.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+14 -5
+14 -5
observe/transcribe/main.py
··· 504 504 505 505 # Sanity check: if VAD detected speech but we got no statements, something is wrong 506 506 if vad_result.has_speech and not statements: 507 - raise RuntimeError( 508 - f"VAD detected {vad_result.speech_duration:.1f}s of speech " 509 - f"(from {vad_result.duration:.1f}s total) but transcription produced " 510 - f"0 statements. This indicates a transcription failure, not silence." 511 - ) 507 + if vad_result.speech_duration < 5.0: 508 + # Marginal speech detection — treat as silence rather than failure. 509 + # VAD occasionally flags brief noise as speech; if the STT backend 510 + # can't produce anything from it, that's expected, not an error. 511 + logging.info( 512 + f"VAD detected {vad_result.speech_duration:.1f}s of marginal speech " 513 + f"but transcription produced 0 statements — treating as silence" 514 + ) 515 + else: 516 + raise RuntimeError( 517 + f"VAD detected {vad_result.speech_duration:.1f}s of speech " 518 + f"(from {vad_result.duration:.1f}s total) but transcription produced " 519 + f"0 statements. This indicates a transcription failure, not silence." 520 + ) 512 521 513 522 # Load config for preserve_all setting 514 523 config = get_config()