Skip to content

Conversation

@AhmadIbrahiim
Copy link

Add VoiceActivityTimeout support to Google STT V2

Adds timeout controls for speech detection in Google STT.

What's new

Two new parameters to control turn detection timing:

  • speech_start_timeout - How long to wait for speech to begin
  • speech_end_timeout - How much silence before considering the turn complete

Both support fractional seconds and handle the protobuf Duration conversion automatically.

Why?

Without these, you can't tune how patient the STT is with pauses or how long it waits for users to start talking. This helps prevent awkward cutoffs or long dead air.

Usage

stt = google.STT(
    model="chirp_3",
    speech_start_timeout=10.0,
    speech_end_timeout=1.5,
)

# Update on the fly
stt.update_options(speech_end_timeout=2.0)

Testing

13 tests covering defaults, updates, fractional seconds, and V1/V2 compatibility. All passing.

@CLAassistant
Copy link

CLAassistant commented Dec 22, 2025

CLA assistant check
All committers have signed the CLA.

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.

2 participants