WinSTT logoWinSTT
Architecture

Events

Everything the Rust backend pushes to the renderer

Where commands are the renderer calling Rust, events are Rust pushing to the renderer. The backend emits them with Tauri's Emitter; windows subscribe with listen.

2
Event flavors
7
Typed payloads
0
Network hops
0
Open sockets

No EventBus, no WebSocket relay

Managers emit Tauri events directly to all windows — there is no event bus and no network relay. The UI subscribes to these event names with Tauri's listen.

Two flavors

Typed payloads

Declared in src-tauri/src/winstt/commands/events.rs, registered in collect_events![...], and mounted via mount_events(app). They derive specta::Type + tauri_specta::Event, so their shapes appear in bindings.ts and are type-checked on both sides.

Plain string events

High-frequency or legacy channels emitted as app.emit(name, payload), matching the listener names the renderer subscribes to — e.g. stt:audio-level fires per audio frame.

Typed payloads

Declared in events.rs and type-checked end to end through bindings.ts.

Typed events from src-tauri/src/winstt/commands/events.rs
Event payloadFieldsMeaning
RealtimeUpdatePayloadtextRaw live-preview text (pre-stabilization)
RealtimeStabilizedPayloadtextLive preview past the committed watermark
WakeWordDetectedPayloadword, word_indexA configured wake word matched
WordAlignmentPayloadword timingsPer-word timestamps for history playback
TtsLifecyclePayloadrequest_id, phase, progress?TTS started / completed / failed / download-progress
FileTranscribeProgressPayloadid, path, status, progress, text?Batch file-transcribe progress

Plain string events

High-frequency and legacy channels, grouped by concern.

Recording lifecycle

EventMeaning
stt:recording-start / stt:recording-stopCapture began / ended
stt:transcription-startFull decode started
stt:full-sentenceFinal transcription result
stt:no-audio-detectedRecording held no speech

Voice activity & audio

EventMeaning
stt:vad-start / stt:vad-stopSpeech onset / offset (smoothed)
stt:audio-levelPer-frame mic level + spectrum (visualizer)

Wake word & realtime

EventMeaning
wake_word_detectedWake word hit → starts dictation
realtime-updateLive preview text tick

Models & swaps

EventMeaning
stt:model-download-progressPer-file download percentage
stt:model-swap-started / -completed / -failedActive-model swap lifecycle
stt:restart-requiredA startup-only setting changed (in-process engine can't hot-apply it)

Settings

EventMeaning
settings:changedFull post-save snapshot, broadcast to every window
settings:save-errorValidation or persistence failure

On this page