Speech recognition for voice agents
Evaluate streaming transcripts, critical entities and phone audio before choosing an STT model.
A caller says an order number. The transcript looks fluent, but one digit is wrong. The agent can now make a perfectly valid request for the wrong order.
Evaluate speech recognition at two levels: what was transcribed, and what the application can safely use. Keep transcript quality, entity correctness and response timing as separate measurements.
Streaming Results
A streaming recognizer returns hypotheses while audio is arriving. Earlier words may change as later sounds provide context. A final result closes a recognition segment; it does not necessarily mean the caller has finished their turn.
Google’s streaming result reference distinguishes interim stability from finality. Stability estimates whether a hypothesis will change, not whether it is correct.
Use partial results for captions or reversible preparation. Before committing an external action, check the required fields against the latest accepted input. Turn detection owns the separate decision about when the agent may speak.
Entity Accuracy
Word error rate counts substitutions, deletions and insertions relative to reference words. It gives every word edit equal weight. Your workflow probably does not.
This is a constructed example, not a model benchmark:
| Reference | Hypothesis | WER | Order number |
|---|---|---|---|
| Please check order seven two nine | Please check order seven two five | 1 / 6 = 16.7% | Wrong |
| Please check order seven two nine | Check order seven two nine | 1 / 6 = 16.7% | Correct |
Report exact entity match alongside WER. Define formatting rules before scoring: an order identifier may need leading zeros, while a quantity may not. Keep raw text so a later normalisation fix can be evaluated without rerunning recognition.
Channel Conditions
Build the evaluation set from the audio path you will deploy. Include the actual codec, sample rate, language, accent, microphone and background conditions. Keep noisy and clean slices separate so one large, easy group does not hide a smaller failure group.
Narrowband telephone audio removes information; upsampling cannot restore it. A simulated phone channel is useful for controlled comparisons, but recorded calls also contain device processing, overlap and network effects that a simple transform does not reproduce.
Latency Budget
Timestamp audio arrival, each partial revision and final segment delivery. Separately measure the caller’s last voiced sample to the first audible reply. The latter includes endpointing, model work, synthesis and playback.
Report a distribution under the expected load, not just the fastest request. A low first-partial time can coexist with late finalisation or frequent revisions. Compare candidates on the same recordings, streaming chunk schedule and scoring policy.
Vocabulary Biasing
Phrase hints can help recognition of names and product codes, but aggressive biasing can also introduce words that were never spoken. Google’s adaptation documentation describes this tradeoff.
Test hints against a held-out set containing both the target terms and similar-sounding alternatives. Keep the configuration that improves the relevant errors without introducing unacceptable false matches. Larger models, hints and fine-tuning are candidates to measure, not a prescribed upgrade order.
Evaluation Plan
| Check | Evidence to retain |
|---|---|
| Transcript quality | Raw reference, hypothesis, normaliser version and edit counts |
| Critical fields | Exact matches and errors grouped by entity type |
| Streaming behaviour | Partial revisions, segment boundaries and timestamps |
| Coverage | Results and sample counts by language and channel condition |
| Action safety | Ambiguous inputs, clarification outcomes and rejected requests |
Start with an annotated set small enough to inspect by hand. Expand it after the sampling and scoring checks hold. Choose the model against explicit acceptance criteria for your calls; a single aggregate score cannot make that decision.
Related guides
Run these components on your own servers, end to end.
See the self-hosted offerDiscussion
Questions, corrections and war stories welcome. Sign in with GitHub to comment.