How styayur/tinystt works
TinySTT is an offline Windows push-to-talk speech-to-text app, with a separate microphone-free WAV recognition mode. The main workflow captures and bounds microphone audio, sends it to a persistent SenseVoice worker, then displays and copies the transcript, with optional paste. The graph also preserves configuration, tray/hotkey controls, debug WAV export, and CLI recognition. Some wiring is supported by README descriptions and module references; unsampled implementation details are not inferred as confirmed calls.
Main entry points: app.rs Desktop UI · worker.rs ASR worker · hotkey.rs Global hotkey · capture.rs Microphone capture
Components 21
App interaction
- Desktop UI
src/app.rs - App state
src/state.rs - Global hotkey
src/hotkey.rs - Tray menu
src/tray.rs - CLI entry point
src/main.rs
Audio capture
- Recording pipeline
src/pipeline.rs - Microphone capture
src/audio/capture.rs - Sample conversion
src/audio/convert.rs - Bounded buffer
src/audio/buffer.rs - WAV tools
src/audio/wav.rs
Speech recognition
- ASR worker
src/asr/worker.rs - Recognizer interface
src/asr/mod.rs - SenseVoice engine
src/asr/sensevoice.rs
Local platform services
- Settings
src/settings.rs - Path and model discovery
src/paths.rs - Clipboard
src/clipboard.rs - Optional auto-paste
src/paste.rs - Runtime logging
src/log.rs
Other components
- User
- Windows desktop
- Local model files
Connections 28
- User → Desktop UI: controls
README.md - User → Global hotkey: presses shortcut
README.md - Global hotkey → Desktop UI: triggers recording
src/app.rs - Desktop UI → Recording pipeline: starts or stops
src/app.rs - Recording pipeline → Microphone capture: starts capture
src/pipeline.rs - Microphone capture → Sample conversion: converts samples
src/audio/capture.rs - Microphone capture → Bounded buffer: appends samples
src/audio/capture.rs - Desktop UI → ASR worker: submits audio
README.md - ASR worker → SenseVoice engine: runs inference
src/asr/worker.rs - SenseVoice engine → Recognizer interface: implements
src/asr/sensevoice.rs - ASR worker → Path and model discovery: resolves model
src/asr/worker.rs - ASR worker → Settings: reads inference options
src/asr/worker.rs - Local model files → SenseVoice engine: provides weights
README.md - ASR worker → Desktop UI: returns transcript events
src/app.rs - Desktop UI → Clipboard: copies transcript
src/app.rs - Desktop UI → Optional auto-paste: optionally invokes
src/app.rs - Desktop UI → App state: updates state
src/app.rs - Desktop UI → Tray menu: handles tray actions
src/app.rs - Desktop UI → Settings: loads and saves
src/app.rs - Settings → Path and model discovery: configures model location
src/paths.rs - Desktop UI → WAV tools: exports debug audio
README.md - CLI entry point → WAV tools: reads WAV audio
README.md - CLI entry point → ASR worker: recognizes WAV
- Tray menu → Windows desktop: integrates with desktop
- Global hotkey → Windows desktop: registers shortcut
- Clipboard → Windows desktop: writes text
- Optional auto-paste → Windows desktop: sends Ctrl+V
- Desktop UI → Runtime logging: records runtime events
src/app.rs