Contents
What to cover
Sketch your own design first. A complete answer has these parts; the notes say what each should settle.
- Requirementsreal-time vs post-call needs; languages/code-switching; accuracy targets per entity type; deployment (cloud vs on-prem); data retention; integration targets (CRM)
- Estimates
- API
- Data model
- Architectureaudio ingestion (WebRTC/SIP); streaming ASR with partials and finals; diarisation; punctuation/formatting/entity normalisation; transcript store; post-call LLM summarisation with structured action items, grounded with timestamps; custom vocabulary; PII redaction; evaluation (WER, diarisation error, summary faithfulness); on-prem/container option
- Deep divessummary assigns an action to the wrong speaker — where did it go wrong?; How do you evaluate summaries across 20 languages?
- Trade-offslatency vs accuracy (lookahead context); streaming partial stability vs speed; summarise from partial vs final transcript; per-customer custom models vs one model
- Evaluationseparates real-time and post-call paths; explicit ASR and diarisation metrics; grounded summaries with timestamps; privacy/redaction
Reference design
One way to answer it, part by part. Open a part once you have your own version of it.
Requirements
Functional: ingest live meetings (Zoom, Teams, Meet bots or SDK) and phone calls (SIP, contact-centre platforms); live captions with speaker labels; after the call, a summary, decisions and action items with owners and due dates, each linked to timestamps; push to CRM and ticketing.
Assumptions to confirm
- Real-time vs post-call: live captions and agent assist need partials < 1 s and finals < 2 s; the post-call summary must be ready within 60 s of the end, p95.
- Languages and code-switching: 30+ languages with automatic language ID; code-switching within a call (Hindi–English, Spanish–English) for key markets.
- Accuracy targets per entity type: names, numbers, amounts, dates, product terms; e.g. ≥ 98% accuracy on numbers and amounts, with custom vocabulary per customer.
- Deployment: multi-region SaaS (UK, EU, US) plus a containerised on-prem/VPC option for banks and governments with no outbound calls.
- Data retention: configurable per tenant — zero audio retention up to multi-year retention for regulated call recording (e.g. MiFID II record keeping); deletion on request.
- Integration targets: Salesforce, HubSpot, Zendesk, Teams/Slack, webhooks.
- Volume: ~2M meetings and calls/day, average 30 minutes.
Estimates
CalculatorPost-call timing budget
- Second-pass ASR/diarisation
- 18 s
- Total processing
- 31 s
- Headroom to target
- 29 s
Second-pass ASR/diarisation = Call length × 60 ÷ Second-pass speed = 18 s
Total processing = Second-pass ASR/diarisation + LLM summary + Grounding check = 31 s
Headroom to target = Target − Total processing = 29 s
| Case | Call length (min) | Second-pass speed (× real time) | LLM summary (s) | Grounding check (s) | Target (s) | Second-pass ASR/diarisation | Total processing | Headroom to target |
|---|---|---|---|---|---|---|---|---|
| Default | 30 | 100 | 10 | 3 | 60 | 18 s | 31 s | 29 s |
- Audio: 2M × 0.5 h = 1M audio hours/day. Average concurrency 1M / 24 ≈ 42k streams; business-hours peak ≈ 2.5× → ~100k concurrent streams.
- Streaming ASR: assuming ~500 streams per GPU for an efficient chunked model → 200 GPUs at peak, ~250 with headroom, spread across regions.
- Post-call burst: meetings end on the hour and half-hour. 100k streams / 30 min ≈ 55 endings/s on average at peak, 3–5× in the minute after :00 → ~250 post-call jobs/s to start promptly.
- Post-call path per call: second-pass ASR and diarisation over 30 min at ~100× real time ≈ 18 s; LLM summary with ~8k input tokens (transcript ≈ 6k + instructions) and ~600 output tokens ≈ 10 s; grounding check ≈ 3 s → ~30 s, leaving headroom for queueing within the 60 s target only if capacity is pre-warmed before the half-hour.
- LLM cost: 2M × 8k = 16B input tokens/day at an assumed $0.5/M = $8k, plus 1.2B output tokens at $2/M = $2.4k → ~$10k/day, about half a cent per call.
- Storage: transcripts ~30 KB per call → 60 GB/day; audio, where retained, at ~7 MB per hour (Opus 16 kbps) → ~7 TB/day.
API
WS /v1/stream?language=auto&diarisation=speaker&max_delay=1.0&vocabulary_id=v_12&channels=2
client → binary audio frames (16 kHz PCM or Opus), {"type": "end"}
server → {"type": "partial", "text", "words": [{w, start, end, conf, speaker}]}
{"type": "final", "text", "words": [...], "speaker": "S2", "language": "en"}
POST /v1/calls/{id}/end → triggers post-call processing
GET /v1/calls/{id}/transcript?format=json|vtt
GET /v1/calls/{id}/summary
→ {summary, decisions[], action_items: [{text, owner: {speaker, name?, confidence},
due?, evidence: [{start, end}]}], topics[], language, model_version}
POST /v1/vocabularies {terms: [{content, sounds_like[]}]}
POST /v1/integrations/{crm}/push {call_id, mapping}
Webhooks: transcript.final, summary.ready
Browser and mobile SDKs authenticate with short-lived tokens minted by the customer’s backend, never API keys. A stream is pinned to one regional worker; on reconnect the client resumes from the last final’s end time so no audio is lost or transcribed twice.
Data model
- Tenant: region, deployment mode, retention policy, redaction policy, integrations, vocabularies.
- Call: id, tenant, source (bot | SDK | SIP), channels, languages detected, start/end, participants from the meeting platform or CRM, retention date.
- Utterance: call_id, start, end, speaker_id, channel, language, text, word timings and confidences, pass (streaming | second-pass).
- SpeakerMap: speaker_id → participant identity, method (dual channel, platform active-speaker events, voice enrolment, inferred), confidence.
- Summary: call_id, version, model and prompt versions, sections, decisions.
- ActionItem: text, owner (speaker and name), due date, evidence timestamps, confidence, accepted/edited by user.
- RedactionMap: PII spans and entity types, token vault reference for authorised re-identification.
- Vocabulary: tenant terms and pronunciations.
Transcripts in a document store partitioned by tenant and region; audio in object storage with lifecycle rules; Kafka for call events.
Architecture
Flow · 4 stepsLive transcription and post-call summarisation
- Ingest Audio enters via bots, SDK or SIP; the gateway buffers, resamples to 16 kHz and runs VAD.
- Live path Streaming ASR emits partials and finals; diarisation, formatting and PII redaction follow, then the transcript is stored and captions are pushed.
- Call end The call-end event triggers the post-call pipeline; second-pass ASR and offline diarisation run on the recorded full audio.
- Summarise The LLM summariser produces structured JSON with cited timestamps; grounding check, summary store and webhooks or CRM push complete the path.
Data
| Step | Title | What happens |
|---|---|---|
| 1 | Ingest | Audio enters via bots, SDK or SIP; the gateway buffers, resamples to 16 kHz and runs VAD. |
| 2 | Live path | Streaming ASR emits partials and finals; diarisation, formatting and PII redaction follow, then the transcript is stored and captions are pushed. |
| 3 | Call end | The call-end event triggers the post-call pipeline; second-pass ASR and offline diarisation run on the recorded full audio. |
| 4 | Summarise | The LLM summariser produces structured JSON with cited timestamps; grounding check, summary store and webhooks or CRM push complete the path. |
Source: This page's text
| Box | Group | Detail |
|---|---|---|
| Bots / WebRTC SDK / SIP | Input | live meetings and calls |
| Regional ingestion gateway | Real-time | jitter buffer, resample 16 kHz, VAD |
| Streaming ASR | Real-time | partials and finals |
| Diarisation + formatting | Real-time | speaker embeddings, PII redaction |
| Transcript store | Real-time | partitioned by tenant and region |
| Live captions (WS) | Real-time | speaker-labelled |
| Call end event | Post-call | triggers post-call processing |
| Second-pass ASR | Post-call | offline diarisation, full audio |
| LLM summariser | Post-call | grounding check, cited timestamps |
| Summary store | Post-call | decisions and action items |
| Webhooks / CRM push | Post-call | summary.ready, transcript.final |
Source: This page's text
Meeting bots / WebRTC SDK / SIP (dual channel where possible)
─► Regional ingestion gateway: jitter buffer, resample to 16 kHz, VAD
─► Streaming ASR: chunked conformer-transducer, language ID, vocabulary biasing
partials (unstable tail) + finals
─► Online diarisation: speaker embeddings + clustering, fused with channel
and platform active-speaker metadata
─► Formatting: punctuation, inverse text normalisation (numbers, dates,
currencies), entity normalisation
─► PII redaction (NER + patterns) ─► transcript store ─► live captions (WS)
Call end event ─► post-call pipeline (priority queue, pre-warmed workers):
second-pass ASR + offline diarisation (full context, more accurate)
─► LLM summariser: structured JSON, every item cites utterance timestamps
─► grounding check (each item entailed by its cited utterances; owner = speaker
of the commitment) ─► summary store ─► webhooks / CRM push
On-prem: the same containers via Helm, local ASR and LLM, no external callsDeep dives
Sequence · 6 stepsDebugging a wrong-speaker action item
- Check diarisation Inspect the evidence timestamps and compare diarisation with channel or platform active-speaker data.
- Check speaker mapping Check whether S2 is linked to the wrong participant name.
- Check ASR Check whether a name or pronoun was misrecognised.
- Check LLM attribution Check whether A's committing utterance was attributed to B.
- Send owner and evidence Pass the owner and cited evidence to the deterministic check.
- Verify owner Confirm the owner matches the cited utterance's speaker unless delegation is explicit; otherwise show owner unclear.
Data
| Step | From | To | Message |
|---|---|---|---|
| 1 | Reviewer | Diarisation | voices merged or split? |
| 1 | Diarisation | Reviewer | compare channel / active-speaker data (reply) |
| 2 | Reviewer | Speaker map | is S2 the right participant? |
| 2 | Speaker map | Reviewer | check S2 -> participant name (reply) |
| 3 | Reviewer | ASR | name or pronoun misrecognised? |
| 3 | ASR | Reviewer | check name / pronoun (reply) |
| 4 | Reviewer | LLM | A's 'I'll send it over' -> B? |
| 4 | LLM | Reviewer | owner = speaker of committing utterance (reply) |
| 5 | LLM | Deterministic check | owner + evidence |
| 6 | Deterministic check | Deterministic check | owner = speaker? |
Source: This page's text
The summary assigns an action to the wrong speaker — where did it go wrong? Follow the evidence timestamps on the action item and check each stage. (1) Diarisation: were two voices merged or one split? Compare with channel or platform active-speaker data. (2) Speaker mapping: is S2 linked to the wrong participant name? (3) ASR: was a name or pronoun misrecognised? (4) LLM attribution: “I’ll send it over” said by A in reply to B’s request is attributed to B. Fixes per stage: dual-channel audio for calls, platform speaker metadata, second-pass diarisation, a prompt requiring the owner to be the speaker of the committing utterance, and a deterministic check that the owner matches the cited utterance’s speaker unless delegation is explicit; otherwise show “owner unclear”.
Evaluating summaries across 20 languages. Build per-language sets of consented real calls (~50 each), annotated by native speakers with key points and action items. Score faithfulness via claim-level entailment against the transcript with a multilingual judge, coverage as key-point recall, and action-item precision, recall and owner accuracy. Calibrate the judge per language against native annotators; where agreement is weak, rely on humans for that language. Translating to English for judging is a cross-check only, since translation adds errors.
Trade-offs
- Latency vs accuracy (lookahead context): more right context lowers WER but delays finals; expose a
max_delayknob and default per use case (captions 1 s, agent assist 0.7 s). - Partial stability vs speed: early partials flicker; only commit a stable prefix and update the tail, measuring partial-to-final edit rate.
- Summarise from partial vs final transcript: streaming transcripts are worse; run a fast second pass on the full audio, then summarise. For long meetings, maintain rolling section summaries during the call and finalise after.
- Per-customer custom models vs one model: vocabulary biasing and prompt-level glossaries cover most needs; fine-tuned models only for large on-prem customers with distinct domains, since each one multiplies evaluation and maintenance.
Evaluation
- Separate real-time and post-call SLOs: partial latency, final latency p95 and time-to-summary p95 < 60 s, tracked separately, including the :00 burst.
- Explicit ASR and diarisation metrics: WER by language, domain and accent; entity error rate for numbers, names and amounts; diarisation error rate (DER) and speaker-attributed WER; language-ID accuracy on code-switched audio.
- Grounded summaries with timestamps: every item must cite evidence; unsupported-item rate measured by entailment checks and sampled human review; action-item F1 and owner accuracy.
- Privacy and redaction: PII recall on labelled calls (missed PII per 1,000 calls), retention and deletion enforcement audits, region pinning checks.
- Online: user edits to summaries and action items, CRM push success, customer error reports, cost per audio hour; drift by tenant and language triggers re-evaluation.
What a strong design shows
- Separates the real-time path from the post-call path, each with its own latency target and capacity plan (including the on-the-hour burst).
- Uses concrete speech metrics — WER by slice, entity accuracy, DER, speaker-attributed WER — rather than “accuracy”.
- Grounds every summary item in timestamps and checks owner attribution deterministically.
- Designs for privacy: redaction, per-tenant retention, regional processing and an on-prem option.
- Can debug a wrong-owner error stage by stage.