Architecture Overview
How WinSTT is built
WinSTT is a single-process desktop application built with Tauri 2:
a Rust backend and a WebView2-rendered React frontend, compiled into one native
executable. There is no separate server and no network hop — speech recognition and
text-to-speech run in-process in Rust on ONNX Runtime (ort).
The two layers
Backend — Rust
src-tauri/. Owns audio capture, voice-activity detection, STT/TTS model loading and
inference, the LLM/cloud integrations, settings, history, and the global hotkey.
Organized under the winstt::* module tree.
Frontend — React 19
Vite multi-page React 19, Feature-Sliced Design (src/). It renders the recording pill,
settings, model picker, history, and overlays across several Tauri windows.
The renderer holds no model code and opens no sockets. It reaches Rust two ways, both
type-checked end-to-end by tauri-specta.
Tauri commands — typed request/response
The React renderer calls into Rust through
#[tauri::command]functions: a typed request goes out, a typed response comes back.Events — push notifications
Rust pushes updates the other direction as events, so the UI reflects recording lifecycle, download progress, and other state without polling.
One binary, no sockets
WinSTT is a single binary: STT and TTS run in-process in Rust on ort, and the renderer
reaches the backend through Tauri commands + events rather than any network relay. A thin
native-bridge adapter maps the renderer's IPC calls onto Tauri.
Deep Dives
Backend Architecture
The Rust winstt::* module tree, the manager layer, the STT pipeline (engine traits, model
families, ort device policy), audio + VAD, TTS, and the threading model.
Frontend Architecture
The Tauri WebView renderer, the native boundary that carries calls and events, Feature-Sliced Design layers, the multi-window setup, and state management.
IPC: Commands
How the renderer reaches Rust — #[tauri::command] functions, the generated bindings.ts,
the command registry, and the command catalog by category.
Events
Everything Rust pushes to the UI — typed tauri-specta payloads and high-frequency plain
string events, from recording lifecycle to download progress.