# Piper TTS (neural voice for J.A.R.V.I.S.) Drop-in replacement for the robotic SAPI voice. ~30 MB binary + ~60 MB Russian voice (Irina). Latency 200-500ms on i5. ## Install ```powershell cd C:\Jarvis\rust\tools\piper pwsh -File install.ps1 ``` By default installs `ru_RU-irina-medium` (Russian female). To pick a different voice: ```powershell pwsh -File install.ps1 -Voice ru_RU-denis-medium pwsh -File install.ps1 -Voice ru_RU-dmitri-medium pwsh -File install.ps1 -Voice ru_RU-ruslan-medium pwsh -File install.ps1 -Voice en_US-amy-medium # English female ``` Force re-download: ```powershell pwsh -File install.ps1 -Force ``` ## Use If `piper.exe` + a voice file are present in `tools/piper/`, J.A.R.V.I.S. auto-detects Piper on startup. No env vars required. To force a specific backend: ```bat set JARVIS_TTS=piper :: use Piper set JARVIS_TTS=sapi :: force SAPI fallback set JARVIS_TTS=silero :: use Silero (needs tools/silero/silero_tts.py) ``` Override paths: ```bat set JARVIS_TTS_PIPER_BIN=D:\custom\piper.exe set JARVIS_TTS_PIPER_VOICE=D:\voices\my-voice.onnx ``` ## Voices catalogue Full list: https://huggingface.co/rhasspy/piper-voices Recommended for Russian: - `ru_RU-irina-medium` — natural female, default - `ru_RU-dmitri-medium` — male, clear diction - `ru_RU-ruslan-medium` — male, slightly deeper - `ru_RU-denis-medium` — male, "newsreader" tone ## Troubleshooting **"piper.exe not found"** — install script failed; check `install.ps1` output. The fallback is SAPI — assistant still works, just with the robotic voice. **"no .onnx voice in voices/"** — voice download failed (HuggingFace blocked?). Manually download from https://huggingface.co/rhasspy/piper-voices/tree/main/ru/ru_RU/irina/medium and drop both `.onnx` + `.onnx.json` into `voices/`. **Voice sounds wrong** — try a different model. Each Russian voice has a different timbre. **No audio output** — Piper writes to a temp wav, then plays via `System.Media.SoundPlayer` synchronously. Check that the default playback device isn't muted.