Agents - Inspect Voice Agent turn latency and outcomes
Cloudflare Voice v0.4.0 adds per-turn metrics to Voice Agents, providing detailed stage latency and terminal outcomes including failures, aborts, and empty responses.
原始内容为英文;当前页面提供中文导航与来源说明,具体事实请以原文为准。
为什么值得关注
@cloudflare/voice v0.4.0 introduces enhanced turn-level diagnostics for real-time Voice Agents on Cloudflare Agents. Prior to this release, the package only provided four aggregate metrics covering successful, non-empty speech turns. The update introduces the turnmetrics event emitting a typed VoiceTurnMetrics object for speech and text turns. Key capabilities of the new metrics include: - Correlation via a unique turnId . - Explicit terminal outcomes: completed , no output , output limit , content filtered , model error , tts error , or aborted , helping developers differentiate why audio was not generated. - Stage-specific latency measurements: speech-to-final-transcript, model-to-first-text, TTS-to-first-audio, and overall turn duration ( turnTotalMs ). Metrics for unreached stages are omitted, and recorded stages may overlap. These summaries can be accessed via VoiceClient.addEventListener('turnmetrics', ...) , useVoiceAgent() , or useVoiceInput() (which provides only speech and transcription timings).
可执行摘要
Cloudflare Voice v0.4.0 introduces the turnmetrics event emitting a typed VoiceTurnMetrics object. It provides turnId , non-additive stage timings (speech-to-final-transcript, model-to-first-text, TTS-to-first-audio, total duration), and terminal outcomes ( completed , no output , output limit , content filtered , model error , tts error , aborted ), exposed via VoiceClient , useVoiceAgent() , and useVoiceInput() .
- Agent 实用度
- 80/100
- 可信度
- 90%
- 机器格式
- JSON + Markdown
开发者应核对什么
- Upgrade @cloudflare/voice to v0.4.0 or later.
- Subscribe to the 'turnmetrics' event on VoiceClient or access turn metrics via useVoiceAgent/useVoiceInput to handle failure modes and track turn latency.