Skip to content

Commit c0efa04

Browse files
authored
Merge pull request #936 from pipecat-ai/docs/pr-4814
docs: update for pipecat PR #4814
2 parents 600a436 + c4921ff commit c0efa04

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

pipecat/fundamentals/metrics.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class MetricsLogger(FrameProcessor):
174174
if isinstance(d, TTFBMetricsData):
175175
print(f"!!! MetricsFrame: {frame}, ttfb: {d.value}")
176176
elif isinstance(d, TTFAMetricsData):
177-
print(f"!!! MetricsFrame: {frame}, ttfa: {d.value}")
177+
print(f"!!! MetricsFrame: {frame}, ttfa: {d.ttfa}, ttfb: {d.ttfb}, leading_silence: {d.leading_silence}")
178178
elif isinstance(d, ProcessingMetricsData):
179179
print(f"!!! MetricsFrame: {frame}, processing: {d.value}")
180180
elif isinstance(d, LLMUsageMetricsData):
@@ -203,11 +203,13 @@ Time To First Byte — measures how long until the first byte of a response is r
203203

204204
### TTFAMetricsData
205205

206-
Time To First Audio — measures the time from a TTS request to the first audible audio sample. This includes the time to first byte plus any leading silence padding added by the service. Comparing TTFA against TTFB reveals how much of the perceived latency is silence padding rather than service response time.
206+
Time To First Audio — measures the time from a TTS request to the first audible audio sample. This includes the time to first byte plus any leading silence padding added by the service. `TTFAMetricsData` reports the latency breakdown directly, showing how much of the perceived latency is silence padding.
207207

208-
| Field | Type | Description |
209-
| ------- | ------- | --------------------------- |
210-
| `value` | `float` | TTFA measurement in seconds |
208+
| Field | Type | Description |
209+
| ------------------ | ------- | ------------------------------------------------------------------------------------------------------------ |
210+
| `ttfa` | `float` | TTFA measurement in seconds (`ttfb` plus `leading_silence`) |
211+
| `ttfb` | `float` | Time-to-first-byte in seconds. Mirrors the standalone `TTFBMetricsData` for convenience, not a separate measurement |
212+
| `leading_silence` | `float` | Silence padding before the first audible sample, in seconds (`ttfa` minus `ttfb`) |
211213

212214
### ProcessingMetricsData
213215

0 commit comments

Comments
 (0)