Troubleshooting
speak() has no player
Pass an AudioPlayer to KittenTTS.create(), or call generate() when you only need WAV data.
iOS player rejects WAV bytes
Tell the app-side player that generated bytes are audio/wav, or write them to a temporary file with a .wav extension.
Android emulator is out of space
adb uninstall com.example.yourapp
flutter run -d android
Wipe the emulator data if uninstalling old builds is insufficient.
First run is slow or restarts
Model and phonemizer files download on first use. Inspect cacheInfo(). If an interrupted asset is corrupt, call redownloadModel() once. The SDK normally retries each file four times.
Web cannot initialize ONNX
Load onnxruntime-web@1.22.0 before flutter_bootstrap.js. Confirm Content Security Policy and hosting permit the script, WASM, model, and dictionary requests.
Web phonemizer behavior differs
The default web path uses the bundled JS/Emscripten CE runtime. allowRuleBasedFallback: true is for experiments and is not quality-equivalent to CE.
Local model files fail immediately
Both ONNX and voices.npz paths must resolve. When modelFiles is set, the SDK does not fall back to downloads.
Include Flutter/Dart versions, target platform, model, and full error in reports: Flutter issues.