Silent Reply
The silent reply metric checks whether your voice agent's replies could actually be heard. A reply that exists as text but was never played, or was played as silence, leaves the caller hearing nothing. It returns the share of agent replies the caller could hear, between 0 and 1.
Required Arguments
To use the SilentReplyMetric, you'll have to provide a ConversationalTestCase with:
audioon the agent's turnscontenton the agent's turns, so a reply with text but no audio can be caught
The metric judges each agent reply on its own. The caller's audio is only used to tell whether the caller was talking, and by the stt_model check.
A stereo recording on the test case isn't enough: the metric matches each transcript line to its turn's audio, so without per-turn audio it's skipped and says why.
Usage
The SilentReplyMetric() 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 SilentReplyMetric
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 = SilentReplyMetric(threshold=1.0)
evaluate(test_cases=test_cases, metrics=[metric])There are FOUR optional parameters specific to the SilentReplyMetric, on top of the common voice metric parameters:
- [Optional]
use_speech_detection: a boolean which when set toTrue, only counts the caller as talking when speech is detected, so background noise isn't mistaken for the caller speaking over a silent reply. Defaulted toTrue. - [Optional]
stt_model: the speech-to-text model that listens around each silent reply for its words, as a string or aDeepEvalBaseSTT. When set, a silent reply whose words are heard nearby isn't counted, as in Silence criteria. Only used with stereo full call audio and clips that have anAudio.start_time. Defaulted toNone, which skips that check. - [Optional]
eval_mode:"deterministic"or"hybrid". In"hybrid", each silent reply 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 SilentReplyMetric 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 reply the caller couldn't hear shows up in score_breakdown. Here is what the example call returns:
{
"eligible_turns": 4,
"turns_with_events": 2,
"events": [
{
"type": "no_audio",
"turn": 3,
"timing_source": "turn_timestamps",
"description": "Reply had no audio",
},
{
"type": "no_speech",
"turn": 5,
"timing_source": "turn_timestamps",
"description": "Reply had no audible speech",
"offset_seconds": 0.0,
"duration_seconds": 2.0,
"start_time": 12.0,
"mark": "whole_reply",
},
],
"skipped": [],
}| Field | What it means |
|---|---|
type | no_audio if the reply has text but no audio, no_speech if its audio holds no audible sound |
turn | Which agent turn was silent, counting from 0 |
duration_seconds | no_speech only. The length of the reply's clip |
start_time | no_speech only. Where the reply starts, in seconds into the call. Missing when the clip has no Audio.start_time |
A no_audio event has nothing to place on the call, so it has no start_time or mark. Agent turns whose audio 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 were silent. The score is the share that could be heard.
How Is It Calculated?
The SilentReplyMetric score is calculated according to the following equation:
Counting agent replies
Every agent turn with text is one reply, including a turn with text but no clip. A turn with no text had nothing to say, so it isn't counted, whatever its audio. Clips that can't be decoded are skipped.
A silent clip is also not counted when it was likely placed in the wrong spot on the call, so its silence says nothing about the reply:
- the clip is shorter than 1 second, or too short to say its own text at 6 words per second, or
- the caller made 0.5 seconds or more of sound during it, so the agent was listening. This needs an
Audio.start_timeon the clip.
Silence criteria
A reply is silent when:
| Check | Rule |
|---|---|
| No audio | The turn has text but no audio |
| No audible sound | Every 20 ms of the clip is below an RMS level of 300, about −41 dBFS |
| Not heard nearby | Only with an stt_model. The call's audio on both channels, from 15 seconds before the clip to 15 seconds after it, is transcribed. If at least 60% of the reply's words are heard there in order, the reply was spoken, just not where its clip was placed, so it isn't silent. The words must be in order so that common words like "you" and "the" don't pass for the reply |
A reply that goes quiet only partway through is reported by Dead Stream instead. The level metrics, such as Loudness, skip inaudible replies and leave them to this metric. If no turn has audio, or no agent turn has text, the metric is skipped.
Second check
In the hybrid eval mode, each silent reply that has a clip is double-checked before it counts. The audio decision model hears the agent's whole reply, from that turn's own clip, and is asked:
Is the AI agent silent here, saying no words?
If the model judges "no" more likely than "yes", the silent reply is dismissed and doesn't count against the score. A no_audio reply has no clip to hear, so it always counts.
Example call
A short call where one reply was never played and another was played as silence. Each row is one agent reply and whether the caller could hear it.
| Agent turn | Audio | Silent? |
|---|---|---|
| 1, "Sure, what's the number?" | Speech | No |
| 3, "One moment." | None | Yes (no_audio) |
| 5, "It ships tomorrow." | A 2-second clip of digital silence, with the caller quiet | Yes (no_speech) |
| 7, "Tomorrow." | Speech | No |
| 4 replies | 2 silent → 2/4 = 0.5 |
FAQs
How is this different from agent responsiveness?
Does this metric call an LLM or an external speech model?
stt_model, the call around each silent reply is transcribed, at one request per silent reply. In the "hybrid" eval mode, each silent reply is also checked by an audio decision model, at one paid request per silent reply. The cost is added to evaluation_cost.