Repository navigation
Troubleshooting and Reporting Issues
This page covers standalone diagnostics, common TTS/ASR/SAPI 5 troubleshooting steps, the per-game compatibility fix policy, hardware testing status, and how to submit actionable bug reports.
Verify that Tonic's core synthesis, grammar parsing, and unit tests work on your machine before debugging a specific game:
# 1. Inspect runtime capabilities and host speech-dispatcher bridge status
./zig-out/bin/tonic info
# 2. Run the full unit test suite across all modules
zig build test --summary all
# 3. Synthesize a test WAV file with the built-in formant synthesizer
./zig-out/bin/tonic speak "Systems ready. Test 1 2 3." --wav /tmp/tonic_test.wav
# 4. Round-trip test finite-grammar recognition against the synthesized WAV
./zig-out/bin/tonic speak "open cargo bay" --wav /tmp/tonic_cmd.wav
./zig-out/bin/tonic recognize /tmp/tonic_cmd.wav \
--phrase "fire missile" \
--phrase "open cargo bay" \
--phrase "raise shields"- Without
--wav,tonic speakdelegates plain-text playback to hostspeech-dispatcher(libspeechd.so.2) when available. - If
speech-dispatcheris not installed or its daemon is not running,tonic speaksynthesizes PCM in memory and prints the sample count rather than opening an audio device directly. - Pass
--wav <file.wav>and play the output with your system audio player (e.g.pw-play,aplay), or install/startspeech-dispatcherif you want direct desktop playback from the CLI.
- Set
TONIC_NO_HOST_SPEECH=1to bypass the runtimedlopen("libspeechd.so.2")probe and force Tonic's built-in pure-Zig Klatt formant synthesizer. - Confirm with
TONIC_NO_HOST_SPEECH=1 ./zig-out/bin/tonic info(should showHost Probe Disabled: yes (TONIC_NO_HOST_SPEECH)).
- Set
TONIC_NO_AUDIO_PLAYBACK=1to bypasswinmm.dllwaveOutplayback while preservingISpVoicesynthesis, event delivery, andWaitUntilDone. - Set
TONIC_NO_MIC_CAPTURE=1to bypasswinmm.dllwaveInmicrophone capture when activatingISpRecognizer.
-
tonic recognizeexpects an uncompressed 16-bit signed PCM RIFF WAV file (audio_fmt = 1,bits_per_sample = 16, up to 32 MiB). - Compressed WAV encodings (ADPCM, μ-law, floating-point IEEE 32-bit) or non-WAV formats (MP3, OGG, FLAC) are rejected. Convert them to 16-bit PCM WAV (e.g. 16000 Hz or 22050 Hz mono) before testing.
-
Check whether the game uses compiled binary SAPI CFG grammars (
SPBINARYGRAMMAR): Tonic currently detects binary CFG blobs safely and returnsS_OKwith zero parsed rules instead of crashing. Titles using SRGS XML, SAPI 5 XML, plain phrase lists, orISpGrammarBuilder::AddWordTransitionare supported. -
Check microphone noise floor and volume: Live
WaveInCaptureuses an adaptive background noise floor and flushes utterances after ~500 ms of trailing silence, requiring a DTW recognition confidence of at least0.35. Excessively quiet microphones or continuous loud background noise can prevent VAD triggering or push confidence below0.35. -
Remember closed-vocabulary scope: Tonic is designed for finite voice-command grammars (
ISpRecoGrammar), not unconstrained free-form dictation (LoadDictationis currently aS_OKno-op). -
Verify PipeWire/ALSA input routing in Vodka: Ensure the host microphone is active in PipeWire/ALSA and visible to Vodka's
libvodka_audio.so.
Enable Pisco logging in Steam Launch Options to confirm sapi.dll loads from files/lib/vodka/tonic/:
PISCO_LOG=1 %command%Inspect $HOME/steam-<APPID>.log for sapi.dll load entries (+loaddll is enabled automatically by PISCO_LOG=1 / PROTON_LOG=1).
Universal SAPI 5, TTS, ASR, and WinMM improvements always go into Tonic's core subsystems so every application benefits. If a specific title exhibits a non-standard SAPI 5 quirk (such as polling without draining async notifications or expecting a looser confidence threshold), per-game workaround flags are isolated strictly by executable basename in src/game_fixes.zig so they never regress other titles.
Note
Hardware Testing Disclaimer: Tonic is developed and verified on an AMD Ryzen CPU (x86_64) running Linux. Multi-architecture Windows PE targets (x86_64-windows, i386-windows, and aarch64-windows) cross-compile cleanly, while native Intel and ARM64 Linux hosts have not yet been validated on hardware.
| Component | Status | Notes |
|---|---|---|
AMD Ryzen CPU (x86_64 Linux) |
Tested & Verified | Primary development, build, CLI, libtonic.so, and full unit test host |
Windows PE x86_64-windows (sapi.dll) |
Cross-Compiled & Pisco-Integrated | Freestanding PE64 DLL (link_libc = false) routed via Pisco VODKADLLPATH and sapi=n
|
Windows PE i386-windows (sapi.dll) |
Cross-Compiled & Pisco-Integrated | Freestanding 32-bit PE32 DLL (winapi/stdcall) for WoW64 prefixes |
Windows PE aarch64-windows (sapi.dll) |
Cross-Compiled Only | Freestanding ARM64 PE DLL builds cleanly; native ARM64 hardware execution untested |
| Intel CPUs / ARM64 Linux Hosts | Untested / Unknown | Expected to work with Zig 0.17.1+; hardware test reports welcome |
If you encounter a bug in Tonic's TTS, SSML, finite-grammar ASR, CLI, libtonic.so, or SAPI 5 sapi.dll compatibility, please open a GitHub issue on buntatoes/tonic (or buntatoes/pisco for Steam Play / Pisco launcher issues) and include:
-
Game or application title — full title name, Steam AppID (if applicable), and any launch options or
TONIC_*/VODKADLLOVERRIDESvariables used. - Steps to replicate — clear, numbered steps to reproduce the issue, along with expected vs. actual behavior (and whether TTS, SSML, XML grammars, binary CFG grammars, or microphone capture are involved).
-
Hardware & OS details — CPU, Linux distro, kernel version, audio server (PipeWire vs. ALSA), microphone device (for ASR issues), and whether
speech-dispatcher(libspeechd.so.2) is installed. - Tonic & Pisco version — the exact Tonic branch/commit (plus Pisco and Vodka versions/commits if running through Pisco).
-
Logs (optional, helpful) —
tonic infooutput,zig build test --summary alloutput, or relevantPISCO_LOG=1/PROTON_LOG=1excerpts (scrubbed of any personal paths or credentials).
Copyright (c) 2026 buntatoes. Tonic is a 100% standalone speech engine built from scratch and licensed under the Apache License 2.0. The Tonic, Pisco, Vodka, and Bitters names, wordmarks, and logos are All Rights Reserved.
Trademarks & Non-Affiliation: Windows and SAPI are trademarks or registered trademarks of Microsoft Corporation. Steam, Steam Play, and Proton are trademarks or registered trademarks of Valve Corporation. Linux, AMD, NVIDIA, Intel, and other third-party trademarks belong to their respective owners; Tonic is an independent open-source project and is not affiliated with, endorsed by, or sponsored by any of them.
Design & Engine
Build & Usage
Support
Links
-
Tonic Repository (
unstable/stable) - Pisco · Pisco Wiki
- Vodka · Vodka Wiki
- Bitters
- Apache-2.0 License