Lesson 5 / Unit 2: Training Data
Transcript Policy
Define what each speech recognition target means and keep identifier characters intact.
Our target is the digit string spoken in the assembled audio. A recording of “zero, seven” becomes 07. It is not converted into the integer seven. The target policy is part of the task definition.
Target Contract
| Audio meaning | Lab target | Do not substitute |
|---|---|---|
| Zero then seven | 07 | 7 |
| Seven twice | 77 | 7 |
| One digit zero | 0 | CTC blank |
| No speech | Outside this training set | An invented digit label |
The model has no token for a space, punctuation or arbitrary letters. A sentence from another dataset cannot be pushed through this vocabulary by deleting everything unsupported; that would silently redefine the labels.
Validate Labels
vocabulary = set('0123456789')for row in rows: assert 1 <= len(row['text']) <= 3 assert set(row['text']) <= vocabulary assert len(row['files']) == len(row['text'])For this assembled corpus, the source filenames provide the digit labels. For natural recordings, an annotation policy must address hesitations, repairs, unclear speech and overlapping speakers. Preserve a verbatim reference alongside any task-specific representation.
Scoring Policy
Scoring uses a sequence of digit characters. It reports digit edit rate and full-string exact match. Calling this ordinary word error rate would hide the tokenisation choice. Later, Word Errors makes the distinction executable.
The normalisation case study shows why preprocessing deserves its own tests. A policy change can move the score without changing a single acoustic prediction.
Write three accepted target examples and three rejected ones before moving on. Keep this policy beside the dataset manifest, and use it when defining Entity Accuracy.
We do this work for teams shipping voice agents: Self-Hosted Voice Agent .
Edit this lesson on GitHub ↗Discussion
Questions, corrections and war stories welcome. Sign in with GitHub to comment.