# `Octoroom.Agent.Processors.STTTurns`
[🔗](https://github.com/samrat/octoroom/blob/v0.1.0/agents/lib/octoroom/agent/processors/stt_turns.ex#L1)

Turn taking by the STT provider's own endpointing.

The user's turn ends with each non-empty final `Transcription` from the
STT stage, which this stage replaces with one carrying a `turn_id`, after
`UserStoppedSpeaking`. Barge-in happens once per stretch of speech, on
whichever comes first: `VADUserStartedSpeaking` or an interim transcript
(the VAD can miss speech that the STT provider hears). Without a VAD, a
stretch lasts until the turn's final transcript.

Options:

  * `:interrupt` (default `true`): `false` leaves out the `Interruption` and
    pushes only `UserStartedSpeaking`, for an agent's per-speaker front ends,
    where the agent decides who may interrupt.
  * `:vad` (default `true`): whether a VAD stage runs upstream.
  * `:finalize_on_vad` (default: the value of `:vad`): when `true`,
    `VADUserStoppedSpeaking` pushes `FinalizeTranscript` upstream if speech
    hasn't finalized yet, instead of waiting on the STT provider's silence
    timeout.
  * `:preemptive` (default: the value of `:finalize_on_vad`): when `true` and
    a non-empty interim transcript was seen, `VADUserStoppedSpeaking` also
    pushes `PreemptiveTranscription` downstream so the LLM can start while
    STT finalizes.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
