Feature Type
Would make my life easier
Feature Description
Problem
The current STTMetrics provides audio_duration, duration, and streamed, but the duration field is always 0 for streaming STT as documented:
duration — For non-streaming STT, the amount of time (seconds) it took to create the transcript. Always 0 for streaming STT.
This means there is no responsiveness metric for streaming STT in the current metrics system. Every other pipeline component has one:
| Component |
Responsiveness Metric |
| LLM |
ttft (Time to First Token) |
| TTS |
ttfb (Time to First Byte) |
| EOU |
end_of_utterance_delay |
| STT (streaming) |
❌ None |
For operators running production voice agents, this gap makes it impossible to:
- Monitor streaming STT engine performance over time
- Compare different STT providers (e.g., Deepgram vs. Google vs. AssemblyAI) under the same pipeline conditions
- Alert on STT latency regressions
- Attribute end-to-end latency to specific pipeline stages
Proposed Solution
Add a new field utterance_end_latency to STTMetrics, defined as:
The wall-clock delay from the end of user speech (VAD END_OF_SPEECH) to the arrival of the final transcript (FINAL_TRANSCRIPT).
This is conceptually identical to TTFS (Time To Final Segment) — an industry metric introduced by Pipecat for benchmarking streaming STT in real-time voice agent applications. TTFS has become the de facto standard for evaluating streaming STT responsiveness, with benchmark results published across major providers.
Why utterance_end_latency (TTFS) matters
In a voice agent pipeline, the end-to-end response latency is roughly:
total_latency ≈ STT_latency + eou.end_of_utterance_delay + llm.ttft + tts.ttfb
Today, STT_latency for streaming mode is a black box — it cannot be measured through STTMetrics. Adding utterance_end_latency closes this observability gap and gives operators the full picture.
Workarounds / Alternatives
Implementation
A draft implementation is available in PR #4966:
👉 #4966
Summary of changes
- Adds
utterance_end_latency (type: float, default: 0) to the STTMetrics dataclass
- Records
_end_of_speech_time on SpeechEventType.END_OF_SPEECH in SpeechHandle
- Computes latency on
SpeechEventType.FINAL_TRANSCRIPT as time.time() - _end_of_speech_time
- Emits the value via the existing
metrics_collected event — no new events or APIs required
- Fully backward-compatible: the field defaults to
0 and only populates when both events occur
Example output
STT utterance_end_latency=0.342s (provider=deepgram, model=nova-3, streamed=true)
Additional Context
Related Issues
Additional Context
Feature Type
Would make my life easier
Feature Description
Problem
The current
STTMetricsprovidesaudio_duration,duration, andstreamed, but thedurationfield is always0for streaming STT as documented:This means there is no responsiveness metric for streaming STT in the current metrics system. Every other pipeline component has one:
ttft(Time to First Token)ttfb(Time to First Byte)end_of_utterance_delayFor operators running production voice agents, this gap makes it impossible to:
Proposed Solution
Add a new field
utterance_end_latencytoSTTMetrics, defined as:This is conceptually identical to TTFS (Time To Final Segment) — an industry metric introduced by Pipecat for benchmarking streaming STT in real-time voice agent applications. TTFS has become the de facto standard for evaluating streaming STT responsiveness, with benchmark results published across major providers.
Why
utterance_end_latency(TTFS) mattersIn a voice agent pipeline, the end-to-end response latency is roughly:
Today,
STT_latencyfor streaming mode is a black box — it cannot be measured throughSTTMetrics. Addingutterance_end_latencycloses this observability gap and gives operators the full picture.Workarounds / Alternatives
Implementation
A draft implementation is available in PR #4966:
👉 #4966
Summary of changes
utterance_end_latency(type:float, default:0) to theSTTMetricsdataclass_end_of_speech_timeonSpeechEventType.END_OF_SPEECHinSpeechHandleSpeechEventType.FINAL_TRANSCRIPTastime.time() - _end_of_speech_timemetrics_collectedevent — no new events or APIs required0and only populates when both events occurExample output
Additional Context
Related Issues
transcription_delaywhen using STT turn detection mode" — Shows the community need for accurate STT timingmin_endpointing_delaybehaves differently in VAD vs STT turn detection mode" — Suggests adding a "silence-to-commit" metricAdditional Context
stt-benchmark: https://github.com/pipecat-ai/stt-benchmark — Open-source framework measuring TTFS and semantic WER across STT providers. Pipecat has integrated TTFS as a first-class configuration parameter (ttfs_p99_latency) since v0.0.102.