Design a Speech Recognition System
Understanding the Problem
📝 What is a speech recognition system? Automatic speech recognition (ASR) turns spoken audio into text. A meeting transcription product (Otter, Zoom's and Teams' transcripts, Google Meet captions) runs ASR on calls to show live captions while people talk and to produce a transcript afterwards: who said what, when, with punctuation, searchable and ready for summaries. Under the hood, it's a neural model that maps audio features to words, plus a lot of engineering around speakers, vocabulary and time.
You'll hear this as "design meeting transcription," "design live captions for video calls," or "design an ASR service." The heart of the problem is that two products share one name. Live captions must appear within about a second, so the model only sees audio up to now and must commit to words before the sentence ends. The final transcript can take a few minutes, see the whole meeting, use a much larger model and get speakers, names and punctuation right. A good design runs both, and shares what it can between them. Three features make meeting ASR harder than generic ASR: knowing who is speaking (diarization), recognizing names and jargon nobody trained the model on (custom vocabulary), and getting timestamps good enough to click a word and jump to that moment.
Functional Requirements
We're the transcription team of a video conferencing product.
Core Requirements
- Participants should see live captions during a meeting, labeled by speaker.
- After the meeting, users should get an accurate transcript with speaker labels, punctuation and word-level timestamps that sync with the recording.
- The system should recognize custom vocabulary: participant names, company and product names, and jargon from an organization's glossary.
- The system should support the major languages and detect which one is being spoken.
Below the line (out of scope)
- Meeting summaries and action items (an LLM over the transcript; we'll note where it plugs in).
- Live translation of captions into other languages.
- Voice commands to the meeting app.
Non-Functional Requirements
Ask about scale and how quickly the final transcript is needed. Our numbers: 2 million meetings a day, averaging 40 minutes and 4 participants. That's 80 million meeting-minutes a day, 80M ÷ 1,440 ≈ 55,000 concurrent meetings on average, and about 150,000 at the weekday peak, since meetings cluster in business hours.
Core Requirements
- Live caption latency: words appear within ~1 second of being spoken (p95), and partial words can be revised for at most a couple of seconds.
- Final transcript ready within 5 minutes of the meeting ending, for 95% of meetings.
- Accuracy: word error rate (WER) around 10% or lower on typical meeting audio for the major languages, with much better accuracy on names from the meeting's own context.
- Privacy: audio and transcripts encrypted, retained per the customer's policy, never used for training without the customer's opt-in; recording and transcription announced to participants.
- Cost: GPU cost per meeting-hour tracked and kept low, since transcription is often included in the subscription price.
Below the line (out of scope)
- On-device ASR for offline use.
- Medical or legal transcription accuracy guarantees.
Some arithmetic:
- Live captions run on every active audio stream. With server-side mixing, that's one stream per meeting: 150,000 concurrent streams at peak. A streaming model of ~100M parameters, batched on a GPU, handles on the order of a few hundred concurrent streams, so live captions need roughly 500 GPUs at peak. If we transcribe each participant's audio separately (better for speaker attribution, as we'll see), voice activity detection keeps the cost manageable: in most meetings only one or two people talk at once, so we only transcribe channels with speech.
- Final transcripts run once per meeting with a larger model. A Whisper-class model of ~1.5B parameters with batched inference runs on the order of 100× faster than real time on a modern GPU, so 80M minutes ÷ 100 = 800,000 GPU-minutes a day, about 13,000 GPU-hours, or ~560 GPUs around the clock, with the work concentrated in business hours.
- Audio itself: 16 kHz mono at 16 bits is 32 KB per second raw, or ~2 MB per minute. Compressed with Opus at ~24 kbps it's ~180 KB per minute, so 80M minutes is ~14 TB a day if we store it.
Name the two products early: "Live captions are a streaming problem with a latency budget; the transcript is a batch problem with an accuracy target. I'll design both and share the audio pipeline, speaker information and vocabulary between them."