Skip to content

Strategy: Self-Improving Transcription & Diarization Quality #5565

Open

Description

@atlas-agent-omi

Goal

Systematically improve Omi transcription accuracy (WER) and speaker diarization quality through concrete, implementable changes to our pipeline. Not benchmarking — actual improvements.


Current Pipeline (as-is)

Omi Device → BLE Opus 32kbps → Backend WebSocket → [VAD Gate] → STT Provider (Deepgram/Soniox/Speechmatics)
                                                                        ↓
                                                              Raw transcript segments
                                                                        ↓
                                                        Speech profile speaker matching
                                                                        ↓
                                                        Speaker embedding comparison
                                                                        ↓
                                                           Segment combining/merging
                                                                        ↓
                                                      LLM post-processing (summary, action items)

Known weaknesses:

  • No audio preprocessing (no noise reduction, no gain normalization)
  • Keyword boosting limited to user-provided vocabulary + "Omi" (max 100 words)
  • No post-STT transcript correction pass
  • VAD gate may clip speech onsets (issue Bug: VAD gate clips beginning of phrases — first words lost in transcription #5265)
  • Speaker ID relies on embedding distance threshold — single threshold for all conditions
  • No feedback loop from user corrections back into the pipeline
  • Language detection per-segment causes mid-conversation language switching

Improvement Plan (ordered by impact × feasibility)

1. 🔴 Auto-Build Custom Vocabulary from User Context (HIGH IMPACT, LOW EFFORT)

Problem: STT providers consistently butcher proper nouns — people names, company names, product names, technical jargon. We only pass user-provided vocab + "Omi" (max 100 keywords).

Fix: Automatically build a per-user keyword list from their existing data:

  • People/contacts names (first, last, full)
  • Capitalized words from recent conversation titles (last 30 days)
  • Proper nouns from action items
  • Installed app names
  • Calendar event titles (if calendar integration enabled)

Where: backend/routers/transcribe.py around line 272 where vocabulary is currently built from transcription_prefs.

Expected impact: 20-40% reduction in proper noun errors. Probably the single highest-ROI change.

2. 🔴 LLM Transcript Correction Pass (HIGH IMPACT, MEDIUM EFFORT)

Problem: Raw STT output has systematic errors: homophones, missing punctuation, wrong capitalization, garbled technical terms. We send this directly to users.

Fix: Add a lightweight LLM correction pass on the finalized conversation transcript during post-processing (not on every streaming segment). Use gpt-4.1-mini with user context (known names, recent topics) to fix:

  • Misspelled proper nouns
  • Homophones (their/there/they're, your/you're)
  • Technical terms phonetically transcribed wrong
  • Missing or incorrect punctuation

Where: backend/utils/conversations/process_conversation.py, after transcript finalization but before summary generation.

Cost: ~$0.001-0.005 per conversation with gpt-4.1-mini. At current volume, negligible.

Expected impact: 10-20% WER reduction on finalized transcripts, especially for proper nouns and technical content.

3. 🔴 Fix VAD Speech Onset Clipping (HIGH IMPACT, LOW EFFORT)

Problem: Issue #5265 — the VAD gate clips the beginning of phrases. First 1-2 words are lost.

Fix: Add a pre-roll buffer to the VAD gate. When VAD detects speech, also send the preceding 200-300ms of audio. The VAD gate already buffers audio — it just needs to include a lookback window when transitioning from silence→speech.

Where: VADStreamingGate implementation.

Expected impact: Eliminates first-word truncation. Directly addresses a top user complaint.

4. 🟡 Language Lock per Conversation (MEDIUM IMPACT, LOW EFFORT)

Problem: Language detection switches mid-conversation, especially for accented speakers. A French-accented English speaker might get segments randomly transcribed in French.

Fix: Detect language in the first 10-15 seconds of audio, then lock it for the rest of the conversation. If >70% of the first 5+ segments agree on a language, lock to that language and restart the STT socket with the locked language for better accuracy. Allow user override in settings.

Where: Segment processing loop in backend/routers/transcribe.py.

Expected impact: Eliminates mid-conversation language switching for monolingual conversations (~90% of users).

5. 🟡 Audio Preprocessing: Gain Normalization (MEDIUM IMPACT, LOW EFFORT)

Problem: Omi device mic gain varies by environment, distance, and user settings. Quiet audio = worse STT accuracy.

Fix: Apply RMS-based gain normalization on the audio stream before sending to STT. Target a consistent RMS level. Cap gain at 10x to avoid amplifying noise in near-silence. Skip normalization when RMS is below a floor threshold (actual silence).

Where: Audio ingestion path, before sending to STT provider.

Expected impact: 5-15% WER improvement for quiet/distant recordings.

6. 🟡 Adaptive Speaker Embedding Threshold (MEDIUM IMPACT, MEDIUM EFFORT)

Problem: Speaker identification uses a single hardcoded SPEAKER_MATCH_THRESHOLD for all conditions. This is too aggressive in some cases (false positives) and too conservative in others (misses).

Fix:

  • Adjust threshold based on number of stored person embeddings (more people = tighter threshold)
  • Use relative ranking: if best match is significantly better than second-best, accept even if absolute distance is marginal
  • Require minimum audio duration for confident matches (already partially done, could be stricter)

Where: _match_speaker_embedding() in backend/routers/transcribe.py around line 1840.

Expected impact: 15-25% reduction in speaker misidentification.

7. 🟡 User Correction Feedback Loop (MEDIUM IMPACT, HIGH EFFORT)

Problem: Users manually correct speaker assignments, but corrections are never fed back into the system.

Fix (speaker corrections):

  • When a user reassigns a speaker, extract that segment's audio and update the person's speaker embedding
  • This is partially built (expand_speech_profile exists but is commented out in conversations.py:408 with "thinh's note: disabled for now")
  • Re-enable and fix expand_speech_profile — use the corrected segment audio to refine the person's embedding

Fix (transcript corrections, future):

Where: backend/routers/conversations.py (uncomment + fix expand_speech_profile), new feedback collection module.

Expected impact: Speaker ID and transcript accuracy improve over time per user. System gets smarter the more someone uses it.

8. 🟢 Noise-Aware STT Routing (LOWER IMPACT, MEDIUM EFFORT)

Problem: All audio goes to the same STT provider regardless of audio quality.

Fix: Estimate audio SNR from the first few seconds, route to the most appropriate provider/model:

  • Clean audio (SNR > 20dB) → cheapest provider (cost optimization)
  • Noisy audio (SNR < 15dB) → best-quality provider or model variant
  • Very noisy (SNR < 10dB) → apply noise reduction preprocessing before STT

Expected impact: 5-10% WER improvement for noisy scenarios, potential cost savings for clean audio.

9. 🟢 Cross-Segment Speaker Consistency (LOWER IMPACT, LOW EFFORT)

Problem: Speaker labels can be inconsistent — same speaker gets different IDs across segments, or speakers swap.

Fix: Post-processing pass that enforces consistency:

  • Short segments (<2 words) between two segments of the same speaker → merge into that speaker
  • If speaker A and B alternate rapidly (sub-second switches), likely a diarization error → merge
  • Speaker ID assigned by embedding match should propagate to all segments with same diarized speaker_id

Where: TranscriptSegment.combine_segments() or a new post-processing step.

10. 🟢 Conversation-End Reprocessing with Full Audio (LOWER IMPACT, HIGH EFFORT)

Problem: Streaming STT is optimized for speed, not accuracy. By the time a conversation ends, we have the full audio but only use the streaming transcript.

Fix: For conversations >5 minutes, run a second-pass transcription on the full audio using a batch/offline model (Whisper Large V3 via fal.ai — already integrated in backend/utils/stt/pre_recorded.py). Compare with streaming transcript, use the better one or merge.

Tradeoff: Adds 30-60s processing time + ~$0.01/conversation. Could be a premium feature or opt-in.


Priority Order

# Improvement Impact Effort When
1 Auto-build custom vocabulary 🔴 High Low This sprint
3 Fix VAD speech onset clipping 🔴 High Low This sprint
4 Language lock per conversation 🟡 Medium Low This sprint
5 Audio gain normalization 🟡 Medium Low This sprint
2 LLM transcript correction pass 🔴 High Medium Next sprint
6 Adaptive speaker threshold 🟡 Medium Medium Next sprint
7 User correction feedback loop 🟡 Medium High Next sprint
9 Cross-segment speaker consistency 🟢 Lower Low Next sprint
8 Noise-aware STT routing 🟢 Lower Medium Backlog
10 Conversation-end reprocessing 🟢 Lower High Backlog

Items 1, 3, 4, 5 are all low-effort and can ship within a week. Together they should meaningfully improve the day-to-day transcription experience for most users.

cc @kodjima33

Activity

  1. added
    enhancement
    backend
    intelligence
    p1
    on Mar 11, 2026
  2. changed the title [-]Transcription & Diarization Quality: Benchmark Framework + Improvement Strategy[/-] [+]Strategy: Self-Improving Transcription & Diarization Quality[/+] on Mar 11, 2026
  3. added
    p2
    and removed
    p1
    on Mar 13, 2026
  4. featurebase-for-github commented on Oct 1, 2026

    @featurebase-for-github

    This issue is linked to our feedback platform. For feedback and updates, please visit this link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendenhancementintelligencep2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions