Audio Dropout
The audio dropout metric checks whether your voice agent's audio cuts out mid-speech: a fraction of a second goes missing, as in "Your appoint… is confirmed". It returns the share of agent replies with no dropout, between 0 and 1.
Required Arguments
To use the AudioDropoutMetric, 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, an Audio.start_time on each clip is optional, and only used to place events on the call's clock.
* 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 AudioDropoutMetric() 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 AudioDropoutMetric
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 = AudioDropoutMetric(threshold=0.8)
evaluate(test_cases=test_cases, metrics=[metric])There are TWO optional parameters specific to the AudioDropoutMetric, on top of the common voice metric parameters:
- [Optional]
eval_mode:"deterministic"or"hybrid". In"hybrid", each dropout 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 toHumeDecisionModel().
As a standalone
You can also run the AudioDropoutMetric 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 dropout shows up in score_breakdown as its own event. Here is what the example call returns:
{
"eligible_turns": 4,
"turns_with_events": 1,
"events": [
{
"type": "audio_dropout",
"turn": 5,
"offset_seconds": 1.1,
"duration_seconds": 0.24,
"start_time": 13.75,
"mark": "range",
"timing_source": "turn_timestamps",
"description": "Audio dropped out for 240 ms",
}
],
"skipped": [],
}Dropout events carry only the fields all voice events share. offset_seconds and duration_seconds cover the gap inside the turn's clip. Clips that can't be decoded are listed under skipped.
eligible_turns is how many agent replies were counted and turns_with_events how many had a dropout. A reply with several dropouts counts once. The score is the share that had none.
How Is It Calculated?
The AudioDropoutMetric score is calculated according to the following equation:
Dropout criteria
A dropout is a short gap where the sound falls away in the middle of speech. A pause between words keeps the room's background noise, or fades in and out. A dropout doesn't.
A dropout is a near-zero gap that passes all of these checks:
| Check | Rule |
|---|---|
| Length | 150 to 480 ms, just under Dead Stream's 0.5 seconds. Listeners didn't notice or mind shorter gaps mid-word |
| Place | Sound on both sides, not at the clip's start or end |
| Sharp edges | The 5 ms at each edge are at least 25% of the level of the 60 ms beside them |
When the clip's pauses have background noise, the gap must also fall to 10% or less of the clip's typical pause noise. When its pauses are near-silent, as with clean TTS, the checks above are enough.
The brief silence before a "p", "t" or "k" and the hiss of an "s" also dip under the pause noise, but they fade in and out, so they fail the sharp-edges check.
If there's nothing to count, the metric is skipped.
Second check
In the hybrid eval mode, each dropout 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 suddenly drop out or go silent mid-word, then come back?
If the model judges "no" more likely than "yes", the dropout is dismissed and doesn't count against the score.
Example call
A call where the agent's audio drops out in one of four replies.
| Agent turn | What happens | Dropout? |
|---|---|---|
| 1 | Steady speech | No |
| 3 | A 150 ms pause that keeps the room noise | No |
| 5 | 240 ms of sound missing, 1.1 s into the clip | Yes |
| 7 | Steady speech | No |
| 4 replies | 1 dropout → 3/4 = 0.75 |
FAQs
How is this different from Audio Integrity?
How is this different from Dead Stream?
Does this metric call an LLM or an external speech model?
"hybrid" eval mode, each dropout is also checked by an audio decision model, at one paid request per dropout.