How drajb/whisper-local works
Whisper Local is an offline desktop dictation application for Windows and macOS. The principal workflow is: a user activates a global hotkey, audio is captured and transcribed locally, text is post-processed, then delivered to the focused application or clipboard. StateManager coordinates that workflow; main.py wires startup and components. The README also documents streaming previews, voice commands, profiles, transforms, settings, and tray controls. Unsampled subsystem links are omitted or marked unverified rather than inferred as calls.
Main entry points: main.py Application startup · state_manager.py Dictation coordinator · system_tray.py System tray · audio_recorder.py Audio capture
Components 23
Capture and recognition
- Global hotkeys
src/whisper_key/hotkey_listener.py - Audio capture
src/whisper_key/audio_recorder.py - Voice detection
src/whisper_key/voice_activity_detection.py - Streaming preview
src/whisper_key/streaming_manager.py - Whisper recognition
src/whisper_key/whisper_engine.py - whisper.cpp backend
src/whisper_key/whisper_engine_cpp.py - Model registry
src/whisper_key/model_registry.py
Dictation workflow
- Application startup
src/whisper_key/main.py - Dictation coordinator
src/whisper_key/state_manager.py - Text post-processing
src/whisper_key/text_postprocess.py - Voice commands
src/whisper_key/voice_commands.py - Text delivery
src/whisper_key/clipboard_manager.py - Usage statistics
src/whisper_key/stats.py
App controls
- System tray
src/whisper_key/system_tray.py - Hotkey cheat sheet
src/whisper_key/cheat_sheet.py - Terminal status
src/whisper_key/terminal_title.py - Autostart control
src/whisper_key/autostart.py - Log bundle
src/whisper_key/bundle_logs.py
Settings and setup
- Configuration
src/whisper_key/config_manager.py - Settings interface
src/whisper_key/settings_ui.py - Profiles
src/whisper_key/profiles.py
Platform services
- Platform adapters
src/whisper_key/platform/__init__.py
Other components
- Dictation user
Connections 26
- Dictation user → Global hotkeys: presses hotkey
- Global hotkeys → Dictation coordinator: dispatches events
- Dictation coordinator → Audio capture: starts or stops
src/whisper_key/state_manager.py - Audio capture → Voice detection: checks speech
src/whisper_key/audio_recorder.py - Dictation coordinator → Whisper recognition: requests transcription
src/whisper_key/state_manager.py - Dictation coordinator → Text post-processing: post-processes text
src/whisper_key/state_manager.py - Dictation coordinator → Text delivery: delivers transcript
src/whisper_key/state_manager.py - Application startup → Dictation coordinator: wires components
src/whisper_key/main.py - Application startup → Audio capture: constructs recorder
src/whisper_key/main.py - Application startup → Whisper recognition: constructs backend
src/whisper_key/main.py - Application startup → whisper.cpp backend: selects backend
src/whisper_key/main.py - Application startup → Streaming preview: initializes preview
src/whisper_key/main.py - Streaming preview → Model registry: uses registry
src/whisper_key/streaming_manager.py - Whisper recognition → Model registry: uses registry
- Dictation coordinator → Voice commands: routes commands
src/whisper_key/state_manager.py - Application startup → Configuration: loads settings
src/whisper_key/main.py - Settings interface → Configuration: reads and edits
src/whisper_key/settings_ui.py - Application startup → System tray: starts tray
src/whisper_key/main.py - System tray → Dictation coordinator: controls dictation
src/whisper_key/system_tray.py - System tray → Hotkey cheat sheet: opens sheet
src/whisper_key/system_tray.py - System tray → Autostart control: controls startup
src/whisper_key/system_tray.py - System tray → Log bundle: opens log bundle
src/whisper_key/system_tray.py - System tray → Profiles: lists profiles
src/whisper_key/system_tray.py - Application startup → Terminal status: updates status
src/whisper_key/main.py - Application startup → Platform adapters: selects adapters
src/whisper_key/platform/__init__.py - Dictation coordinator → Usage statistics: records usage
src/whisper_key/state_manager.py