📍 Join the 1st DeepEval meetup in SF, this Friday 5pm PT. RSVP on Luma →
💥 Introducing JevEval: Jev-as-a-Judge for LLM evaluation. Read the post →
Voice AgentsAudio Defects

Dead Stream

Beta
Multi-turn
Referenceless
Chatbot
Voice

The dead stream metric checks whether your voice agent's audio goes completely dead partway through a reply: the stream drops to exact digital silence, not a pause with room noise. It returns the share of agent replies with no dead stretch, between 0 and 1.

0.0s / 7.2s

Required Arguments

To use the DeadStreamMetric, you'll have to provide a ConversationalTestCase with audio on the agent's turns, or on the test case as a stereo recording of the whole call*.

With per-turn audio, give every clip an Audio.start_time. Without it, the metric can't tell whether the caller was talking during a dead stretch, and the stt_model check is skipped.

* Full call audio has to be stereo, with the caller and agent on separate channels, and is only used when no turn has audio. Each agent reply is then heard on the agent's channel, from its first sound until the caller speaks.

Usage

The DeadStreamMetric() can be used for end-to-end evaluation of voice calls, such as ones produced by the ConversationSimulator in voice mode:

from deepeval import evaluate
from deepeval.dataset import ConversationalGolden
from deepeval.metrics import DeadStreamMetric
from deepeval.simulator import ConversationSimulator
from deepeval.voice import ElevenLabsConnector, VoiceConfig


golden = ConversationalGolden(
    scenario="The user asks the agent to look up an order by its number.",
    expected_outcome="The agent reads back the order status.",
)

simulator = ConversationSimulator(
    voice_config=VoiceConfig(
        connector=ElevenLabsConnector(agent_id="your-agent-id"),
    )
)
test_cases = simulator.simulate([golden])

metric = DeadStreamMetric(threshold=0.8)
evaluate(test_cases=test_cases, metrics=[metric])

There are FOUR optional parameters specific to the DeadStreamMetric, on top of the common voice metric parameters:

  • [Optional] use_speech_detection: a boolean which when set to True, only counts the caller as talking when speech is detected, so background noise isn't mistaken for the caller speaking during a dead stretch. Defaulted to True.
  • [Optional] stt_model: the speech-to-text model that transcribes the agent's audio around each dead stretch, as a string or a DeepEvalBaseSTT. When set, a dead stretch after a finished sentence isn't counted (see Dead stream criteria). Only used when the test case has stereo full call audio, since that's what is transcribed. With per-turn audio as well, the clip also needs an Audio.start_time. Defaulted to None, which skips that check.
  • [Optional] eval_mode: "deterministic" or "hybrid". In "hybrid", each dead stretch is double-checked by an audio decision model before it counts. Defaulted to the configured voice eval mode ("deterministic" unless set).
  • [Optional] audio_decision_model: the model that does the second check in "hybrid" mode. Defaulted to HumeDecisionModel().

As a standalone

You can also run the DeadStreamMetric on a single test case as a standalone, one-off execution:

metric.measure(test_cases[0])

print(metric.score, metric.reason)
print(metric.score_breakdown)

See Events for what score_breakdown contains.

Events

Each dead stretch shows up in score_breakdown as its own event. Here is what the example call returns:

{
    "eligible_turns": 5,
    "turns_with_events": 1,
    "events": [
        {
            "type": "dead_stream",
            "turn": 5,
            "role": "assistant",
            "offset_seconds": 1.0,
            "duration_seconds": 0.7,
            "start_time": 13.8,
            "mark": "range",
            "timing_source": "turn_timestamps",
            "description": "Agent's audio went dead for 0.7s",
            "position": "middle",
            "runs_to_end": False,
        }
    ],
    "skipped": [],
}
FieldWhat it means
runs_to_endAlways False here, since silence that runs to the end of the clip isn't counted
positionWhether the dead stretch is near the start, middle or end of the clip

Clips that can't be decoded are listed under skipped. Every event also has the fields all voice events share, such as mark and description.

eligible_turns is how many agent replies were counted and turns_with_events how many went dead. The score is the share that didn't.

How Is It Calculated?

The DeadStreamMetric score is calculated according to the following equation:

Dead Stream=Number of Agent Replies Without a Dead StreamTotal Number of Agent Replies\text{Dead Stream} = \frac{\text{Number of Agent Replies Without a Dead Stream}}{\text{Total Number of Agent Replies}}

Dead stream criteria

A pause in a recorded voice keeps some room noise. A stream that drops leaves exact zeros.

CallerAgentturn 1turn 2turn 3dead streamstream cut0s2s4s6s8s10s

A dead stretch is a run of 20 ms frames where every sample is within 2 of zero. It counts when it comes after the agent has started talking and passes these checks:

CheckRule
Mid-replyAt least 0.5 seconds, with sound after it in the clip
Caller not talkingThe caller made less than 0.2 seconds of sound during it. An agent that goes quiet while the caller talks is listening, even if the caller only says "yes". Only checked when the clip has an Audio.start_time

Silence that runs to the end of a clip isn't counted here. When the agent's own clip is next on the call, within 15 seconds, it's a stream cut, which Abrupt Cut-off reports instead.

Exceptions:

  • If the agent's typical pause, across all its clips in the call, is at least 20% exact zeros, its voice writes pauses as silence, so nothing is reported for it.
  • With an stt_model, a dead stretch isn't counted when the agent's last word before it ends a sentence, with ., ? or !. The agent paused after a finished sentence, for example to look something up or wait for an answer, rather than its audio dying. To read that word's punctuation, the metric transcribes about 4 seconds of the agent's audio before the stretch, and the span from there to 3 seconds after it. Speech that trails off, ending in ... or …, still counts as unfinished.

If there's nothing to count, the metric is skipped.

Second check

In the hybrid eval mode, each dead stretch is double-checked before it counts. The audio decision model hears about 5 seconds of the agent's side of the call around it and is asked:

Does the speaker's audio go completely dead partway through, as if the line dropped?

If the model judges "no" more likely than "yes", the dead stretch is dismissed and doesn't count against the score.

Example call

A call where the agent's stream goes dead mid-reply once, and drops at the end of another reply before picking back up.

CallerAgent13578clean: shortstream cut0s5s10s15s20s
Agent turnWhat happensDead stream?
1Normal speechNo
30.3 s of exact silence mid-reply, under the 0.5 s minimumNo
50.7 s of exact silence mid-replyYes
71.2 s of exact silence at the end of the clip, then the agent resumes in turn 8No: it runs to the end of the clip, so it's a stream cut for Abrupt Cut-off
8Normal speechNo
5 replies1 dead stream → 4/5 = 0.8

FAQs

Why are silent pauses ignored for some voices?
Some synthetic voices write their pauses as exact zeros. When the agent's typical pause is at least 20% zeros, a dropped stream can't be told apart from a normal pause, so nothing is reported.
Why is a stream cut not counted here?
The listener hears a reply that stops and then picks up again, so it's reported once, by AbruptCutoffMetric, rather than by both metrics.
Does this metric call an LLM or an external speech model?
Not by default. Detection is deterministic and runs locally over the audio, so it has no model or token cost. With an stt_model, the agent's audio around each dead stretch is transcribed, at up to two requests per stretch. In the "hybrid" eval mode, each dead stretch is also checked by an audio decision model, at one paid request per stretch. The cost is added to evaluation_cost.
Does it check the caller's audio too?
No. Only the agent's replies are scored. The caller is your simulator's TTS voice or a real customer, so their audio says nothing about the agent.

On this page