WinSTT logoWinSTT

Command-Line and Headless Transcription

Launch flags, headless file transcription and benchmarking, and developer-only STT/TTS harnesses.

WinSTT is a single native executable. It supports desktop launch controls, actions forwarded to an already-running instance, and a headless file-transcription path for scripts and reproducible benchmarks.

WinSTT [OPTIONS]
1
Native executable
0
Webviews in headless mode
3
Forwarded to the running instance

Most config lives in the UI, not the CLI

Interactive dictation settings still live in the Settings UI. Headless file transcription selects its model and device explicitly and does not change those persisted settings.

App flags

FlagWhat it does
--start-hiddenStart with the main pill window hidden (tray only).
--no-trayDon't create the system-tray icon.
--toggle-transcriptionToggle dictation on/off. Forwarded to the running instance.
--toggle-post-processToggle dictation with LLM post-processing on/off. Forwarded to the running instance.
--cancelCancel the current operation. Forwarded to the running instance.
--debugEnable verbose logging.
-h, --helpPrint help and exit.

The forwarded flags drive shortcuts

WinSTT runs single-instance. Launching the exe again with --toggle-transcription, --toggle-post-process, or --cancel doesn't open a second window — it hands the flag to the instance that's already running. Bind a global shortcut (or a stream-deck button, or a script) to WinSTT.exe --toggle-transcription to start/stop dictation from anywhere.

Headless file transcription

--transcribe-file exits after printing the transcript and timing data. It initializes only the media decoder, model resolver, ONNX Runtime sessions, and (for long audio) the segmentation VAD. It does not create the Tauri app, webviews, tray, microphone capture, clipboard/paste path, global shortcuts, or desktop background managers.

WinSTT --transcribe-file recording.wav
WinSTT --transcribe-file interview.mp3 --model small --device cpu
WinSTT --transcribe-file sample.flac --device directml --warm --repeat 3 --json
WinSTT --transcribe-file sample.wav --cold --repeat 3
FlagWhat it does
--transcribe-file <PATH>Decode and transcribe WAV, MP3, MP4, AAC, FLAC, OGG, or Vorbis media, then exit.
--model <ID>Select an embedded catalog id. Defaults to tiny.en.
--device <DEVICE>Select auto, cpu, directml, cuda, coreml, rocm, openvino, or webgpu. Uncompiled providers fail explicitly.
--repeat <N>Run N measured decode passes. The loaded engine is reused unless --cold is set.
--warmRun the production-style one-second-silence kernel warmup after each model load and report its duration.
--coldDestroy and rebuild ONNX sessions before every repeated pass. This measures provider/kernel-cold launches; it does not flush the operating-system disk cache.
--jsonEmit one machine-readable result containing transcript and all measurements.
--list-modelsPrint catalog ids, engine families, repositories, parameter counts, and quantizations, then exit.
--list-devicesPrint the execution providers compiled into this build and the provider selected by auto, then exit.

The resolver checks the Hugging Face cache first. If the requested model is absent, the headless route downloads it before constructing ONNX sessions. Quantization uses the same RAM/VRAM-aware automatic policy and the same per-engine provider overrides as desktop dictation.

Benchmark output

Each run reports session load time, optional warmup time, decode time, real-time factor (RTF = decode seconds / audio seconds), active ONNX execution providers, current resident memory, and the transcript. The top-level result also reports media-decode time, model-resolution time, audio duration, selected model/quantization/device, and peak resident memory. On Windows, peak resident memory comes from the operating system's process peak working set; other platforms report the highest sampled resident set.

Use a release build for performance measurements

Debug builds include compiler instrumentation and are not representative. Run benchmarks against a packaged build or cargo run --release -- --transcribe-file ... from src-tauri/.

Developer Benchmark Binaries

Developer-only — not in the shipped app

These cargo run --example harnesses live in src-tauri/examples/ and are driven by environment variables. You only need them if you're hacking on the inference path. They are used to benchmark and de-risk the STT/TTS engines during the port.

stt_decode_bench — STT decode benchmark

Decodes a fixed 16 kHz JFK sample through the unified ort engine and prints the transcript + timing, so you can A/B a model, quantization, or execution provider.

cargo run --release --example stt_decode_bench                       # whisper-tiny.en, CPU
cargo run --release --example stt_decode_bench -- <hf_snapshot_dir> [n_mels] [lang]
STT_BENCH_PROVIDER=dml cargo run --release --example stt_decode_bench    # measure the DirectML path
Env varWhat it does
STT_BENCH_PROVIDERExecution provider: cpu (default), dml, or cuda.
STT_BENCH_QUANTOverride the resolved quantization (e.g. int8, fp16) to A/B precisions.
STT_BENCH_CACHE_ONLYResolve from the on-disk HF cache only (no network).
HF_HUB_CACHE / HF_HOMEWhere to find / download model snapshots.

kokoro_tts_bench — Kokoro TTS benchmark

Times the shipped Kokoro synthesis path (warm/cold) on CPU or DirectML.

cargo run --release --example kokoro_tts_bench
KOKORO_TTS_BENCH_DEVICE=dml cargo run --release --example kokoro_tts_bench   # measure the GPU path
Env varWhat it does
KOKORO_TTS_BENCH_DEVICEExecution device: cpu (default) or dml.
WINSTT_KOKORO_DIROverride the model / voicepack location.

tts_engine_bench — exploratory TTS engines

Runs the experimental TTS engines (kitten / piper / supertonic / chatterbox) that are not in the shipped app, loading their weights from .tts-cache/<engine>/.

rem from the repo root — wraps the MSVC env + redirects output to %TEMP%\winstt-tts-engine-bench.log
tools\windows\tts-engine-bench.bat <engine> [voice] [text]
Env varWhat it does
WINSTT_TTS_CACHEOverride the cache root that holds .tts-cache/<engine>/.
ESPEAK_NG_LIBRARYPath to the espeak-ng DLL (auto-resolved to the bundled copy if unset).

dictation_prompt_cases — dictation prompt fixtures

Writes the exact dictation system/user prompts used by the app for a small set of vocabulary and replacement-pair cases. The companion runner sends them to a local Ollama model and verifies the expected terms.

cd src-tauri
cargo run --example dictation_prompt_cases > cases.json
python ../tools/bench/run_dictation_cases.py cases.json [model]

On this page