How optiummusic/whisper-real-time-transcription works
This workspace provides an offline real-time transcription and translation application, plus a lexical-database library and its CLI/editor. The documented main workflow captures and resamples audio, detects speech, transcribes it in fast and accurate passes, then presents live results and word-level translations. Source excerpts confirm the application’s task setup, Whisper workers, UI, and LXDB entry points; some intermediate wiring and save behavior are documented but not shown in sampled source.
Main entry points: whisper.rs Fast transcription · types.rs Transcript events · config.rs Runtime settings · builder.rs Binary compiler
Components 24
Transcription app
- Audio input
- App runtime
transcriber/src/main.rs - Runtime settings
transcriber/src/config.rs - Transcript events
transcriber/src/types.rs
Speech pipeline
- Capture and resample
transcriber/src/audio.rs - Speech detection
transcriber/src/vad.rs - Fast transcription
transcriber/src/whisper/whisper.rs - Whisper inference
transcriber/src/whisper/engine.rs - Accurate transcription
transcriber/src/whisper/whisper.rs - Local models
models
Presentation and translation
- Word translation
transcriber/src/translation - Replacement rules
dictionary/rules.toml - Live interface
transcriber/src/ui.rs - Transcript display
transcriber/src/display_task.rs - Saved transcripts
LXDB tools
- LXDB CLI
lxdb/src/main.rs - LXDB editor
lxdb/src/bin/editor.rs - Lexicon schema
lxdb/src/toml_schema.rs - Binary compiler
lxdb/src/builder.rs - Binary format
lxdb/src/format.rs - Lexicon reader
lxdb/src/reader.rs - Lexicon TOML
dictionary/main.lxdb.toml - LXDB file
dictionary/main.lxdb
Other components
- User
Connections 34
- User → Live interface: configures and views
- Audio input → Capture and resample: supplies audio
- App runtime → Capture and resample: starts capture
- Capture and resample → Speech detection: resampled audio
- Speech detection → Fast transcription: speech chunks
- Fast transcription → Whisper inference: runs inference
- Accurate transcription → Whisper inference: runs inference
- Fast transcription → Accurate transcription: completed phrase audio
- Local models → Fast transcription: fast model
- Local models → Accurate transcription: accurate model
- Runtime settings → Capture and resample: audio settings
- Runtime settings → Speech detection: VAD settings
- Runtime settings → Fast transcription: engine settings
- Runtime settings → Accurate transcription: engine settings
- App runtime → Transcript events: routes events
- Fast transcription → Transcript events: emits preview
- Accurate transcription → Transcript events: emits final text
- Transcript events → Live interface: delivers transcript
- Transcript events → Word translation: dispatches transcript
- Replacement rules → Word translation: overrides words
- Word translation → Live interface: translation results
- Live interface → Transcript display: renders transcript
- Transcript display → Saved transcripts: optional save
- User → LXDB CLI: runs commands
- User → LXDB editor: edits lexicon
- LXDB CLI → Lexicon schema: parses source
- LXDB editor → Lexicon TOML: edits and saves
- Lexicon schema → Binary compiler: compiled by
- Binary compiler → Binary format: encodes bytes
- LXDB CLI → Lexicon reader: loads and queries
- Lexicon reader → Binary format: reads layout
- Lexicon TOML → Binary compiler: compile input
- Binary compiler → LXDB file: writes database
- LXDB file → Lexicon reader: loads database