This guide helps resolve common issues when using piper-plus, especially with Japanese text-to-speech functionality.
- General Issues
- Japanese TTS Issues
- Platform-Specific Issues
- Build Issues
- Performance Issues
- Security Audit CI Issues
- Training Troubleshooting
- C# CLI (PiperPlus) のトラブルシューティング
Symptoms:
Error: Model file not found: model.onnx
Solutions:
- Verify the model file path is correct
- Use absolute paths to avoid confusion
- Check file permissions
- Download models from official sources
症状:
Model config doesn't exist
設定ファイルの検索順序: piper は以下の順序で設定ファイルを自動検索します。
<モデル名>.onnx.json(例:model.onnx→model.onnx.json)- モデルと同じディレクトリ内の
config.json(フォールバック)
このフォールバックにより、多くの場合 --config の指定は不要です。
原因: 上記のどちらも見つからない場合にこのエラーが発生します。
解決方法:
-
モデルと同じディレクトリに
config.jsonまたは<モデル名>.onnx.jsonを配置する -
--configオプションで明示的に指定:piper-plus --model models/model.onnx --config /path/to/config.json --output_file out.wav
-
同一ディレクトリに複数モデルがあり
config.jsonでは区別できない場合、モデルごとにリネーム:mv config.json model.onnx.json
Symptoms: Command runs without errors but no audio file is created
Solutions:
- Check output file path has write permissions
- Verify
--output_fileparameter is specified - Try
--output_rawto test raw audio output - Check system audio drivers are working
Symptoms:
[error] OpenJTalk is not available or failed to process Japanese text
Common Causes & Solutions:
-
Dictionary not found
# Enable auto-download export PIPER_PLUS_AUTO_DOWNLOAD_DICT=1 # Or specify manually export OPENJTALK_DICTIONARY_PATH=/path/to/dictionary
-
Using wrong model type
- Ensure you're using a Japanese model (ja_JP-*.onnx)
- For Python inference (
infer_onnx), the Phonemizer registry selects the G2P backend via--language(ja→pyopenjtalk, en→g2p-en) - For the C++ CLI and preprocessing,
phoneme_typeinconfig.jsonis still used to choose how text is phonemized - Ensure config.json has the correct
"phoneme_type":"openjtalk"for Japanese models,"multilingual"for multilingual models
Symptoms:
Error: Failed to download dictionary
Auto-download is disabled. Please download and install the dictionary manually.
Solutions:
-
Enable auto-download:
unset PIPER_PLUS_AUTO_DOWNLOAD_DICT # Remove if set to 0 unset PIPER_PLUS_OFFLINE_MODE # Remove if set to 1
-
Manual download:
# Download dictionary wget https://github.com/r9y9/open_jtalk/releases/download/v1.11.1/open_jtalk_dic_utf_8-1.11.tar.gz # Extract to data directory # Windows: %APPDATA%\piper-plus\ # Linux/macOS: ~/.local/share/piper-plus/ tar -xzf open_jtalk_dic_utf_8-1.11.tar.gz
-
Check network:
- Verify internet connection
- Check proxy settings
- Try different download method (curl vs wget)
Symptoms:
Error: Checksum mismatch! Expected abc123..., got def456...
Solutions:
- Delete corrupted download and retry
- Check disk space
- Verify network stability
- Try manual download with checksum verification
Symptoms: Command completes but audio is silent or corrupted
Possible Causes:
-
Wrong encoding: Ensure UTF-8 encoding
# Windows chcp 65001 # Save text as UTF-8 echo "テスト" > test.txt # Use UTF-8 editor
-
Unsupported characters: Some special characters may not be supported
-
Model mismatch: Ensure model supports Japanese phonemes
Solution:
REM Set console to UTF-8
chcp 65001
REM Use PowerShell instead
powershell -Command "echo 'こんにちは' | .\piper-plus.exe --model model.onnx --output_file out.wav"症状: PowerShell から日本語テキストをパイプすると、OpenJTalk が No phoneme で失敗する。
原因: Windows のコンソールエンコーディングが UTF-8 でないため、パイプ経由で文字化けが発生。
解決方法:
-
cmd で
chcp 65001を実行してから使用:chcp 65001 echo こんにちは | piper-plus.exe --model model.onnx --config config.json --output_file out.wav
-
ファイル経由で入力 (最も確実):
REM UTF-8 BOMなしでテキストファイルを作成 powershell -Command "$utf8 = New-Object System.Text.UTF8Encoding($false); [System.IO.File]::WriteAllText('input.txt', 'こんにちは', $utf8)" chcp 65001 type input.txt | piper-plus.exe --model model.onnx --config config.json --output_file out.wav
-
v1.5.5以降: piper-plus.exe 内部で
SetConsoleCP(CP_UTF8)が呼び出されますが、一部の環境ではパイプ入力に効かない場合があります。その場合は方法2を使用してください。
Solutions:
- Use short paths without spaces
- Quote all paths:
"C:\Program Files\piper-plus\bin\piper-plus.exe" - Use forward slashes:
C:/piper-plus/bin/piper-plus.exe
If scripts are blocked:
# Allow script execution (run as admin)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserSolution:
# Remove quarantine attribute
xattr -cr /path/to/piper/Solutions:
# Make executable
chmod +x piper-plus/bin/piper-plus
# Check SELinux (if applicable)
sudo setenforce 0 # Temporary disable to testSolution:
# Specify ONNX Runtime location
cmake .. -DONNXRUNTIME_DIR=/path/to/onnxruntimeCommon fixes:
-
Ensure all submodules are initialized:
git submodule update --init --recursive
-
Install required build tools:
# Ubuntu/Debian sudo apt-get install build-essential cmake # macOS brew install cmake ninja # Windows # Install Visual Studio with C++ support
Cause: Downloading dictionary/voice files
Solutions:
- Pre-download files in deployment
- Use local mirror for downloads
- Cache downloaded files
Solutions:
- Process text in smaller chunks
- Use streaming mode for long texts
- Monitor with:
piper-plus --debug
Solutions:
- Use faster models (small/medium vs large)
- Enable GPU acceleration if available
- Reduce audio quality if acceptable
Enable debug output for more information:
piper-plus --debug --model model.onnx < input.txtIf issues persist:
- Check logs: Look for error messages and warnings
- Version info: Include
piper-plus --versionoutput - System info: Include OS, architecture, installation method
- Reproduction steps: Provide minimal example
- Report issue: https://github.com/ayutaz/piper-plus/issues
| Error | Cause | Solution |
|---|---|---|
| "OpenJTalk is not available" | Dictionary missing | Download/specify dictionary |
| "Failed to initialize OpenJTalk" | Dictionary missing | Download/specify dictionary |
| "Unknown multi-character phoneme" | Wrong phoneme format | Update to latest version |
| "Checksum verification failed" | Corrupt download | Re-download files |
| "UnicodeEncodeError" (Windows) | Console encoding | Use chcp 65001 |
Symptoms: The Audit src/python_run step of the
Security Audit / pip-audit (Python) job fails on a push to dev / main
(it is continue-on-error on pull requests, so PRs only warn), reporting a
CVE / PYSEC advisory against a package that is not listed directly in
requirements.txt — e.g. a g2p-en → nltk → joblib transitive dependency.
The same commit may pass in a later schedule run.
The sibling
Audit root requirementsstep never fails the job on any event — it is unconditionallycontinue-on-error: truebecause it audits the workspace-meta dev/train closure, which piper-plus does not distribute. Its findings are reported in the log for information only. See the tier rationale in.github/workflows/security-audit.yml.
Most common root cause: a transient upstream advisory-data defect, not a
real regression in this repo. OSV / PyPA advisories are sometimes auto-generated
with a missing last_affected / fixed field, which OSV interprets as "all
versions affected" — so even an already-patched version gets flagged. Once the
advisory is corrected upstream, the finding disappears with no code change.
Real example (2026-05):
nltkPYSEC-2026-97andjoblibPYSEC-2024-277were generated on 2026-05-20 withintroduced: 0and nolast_affected, so the safe versionsnltk 3.9.4/joblib 1.5.3were flagged. Thepypa/advisory-databasePR #289 ("Update records generated incorrectly", 2026-05-21) addedlast_affected: 3.9.2/1.4.2, after which the same commit passed.
Diagnosis:
-
Open the failed job and note which step failed (
Audit root requirementsvsAudit src/python_run) and the exactName / Version / IDrows. -
Check whether the flagged version is actually inside the advisory's affected range by inspecting the advisory YAML
rangesevents:gh api repos/pypa/advisory-database/contents/vulns/<pkg>/<PYSEC-ID>.yaml \ -H "Accept: application/vnd.github.raw" | grep -E "introduced|last_affected|fixed"
-
If the resolved version is above
last_affected(orlast_affectedis missing entirely), suspect an upstream data defect. Inspect the advisory's commit history to see whether the range was recently corrected:gh api "repos/pypa/advisory-database/commits?path=vulns/<pkg>/<PYSEC-ID>.yaml"
Resolution:
- If upstream already corrected the range, a re-run / re-push clears it — no code change required.
- To stop a future resolution from regressing into a truly-affected version,
add a lower-bound floor for the transitive package in
src/python_run/requirements.txt(e.g.nltk>=3.9.4,joblib>=1.5.0). - Avoid
pip-audit --ignore-vuln <ID>unless the advisory is a documented, vendor-disputed false positive; if used, add a comment citing the dispute and a removal condition so the suppression cannot hide a future genuine finding.
Symptoms: Inference audio is a continuous "beep" tone instead of speech. This indicates the Duration Predictor failed to learn properly.
Solutions:
-
Use
--samples-per-speakerto ensure balanced batches across speakers:--batch-size 20 --samples-per-speaker 4 # 5 speakers x 4 samples = 20 -
Disable automatic learning rate scaling:
--disable_auto_lr_scaling
-
Lower the learning rate:
--base_lr 1e-4
Symptoms: Training crashes with CUDA OOM errors.
Solutions:
-
Set NCCL environment variables (required for multi-GPU):
export NCCL_DEBUG=WARN export NCCL_P2P_DISABLE=1 export NCCL_IB_DISABLE=1
-
Reduce
batch_sizeandsamples_per_speaker:--batch-size 12 --samples-per-speaker 2
-
Avoid resuming training from a checkpoint that was saved with a different batch size, as this can cause memory allocation issues.
Symptoms: Errors during export_onnx.py, especially on GPU machines.
Solutions:
-
Run ONNX conversion in CPU mode to avoid GPU-related issues:
CUDA_VISIBLE_DEVICES="" uv run python -m piper_train.export_onnx \ /path/to/checkpoint.ckpt /path/to/output.onnx -
Stochastic + EMA are enabled by default. Use
--no-stochasticfor deterministic export:CUDA_VISIBLE_DEVICES="" uv run python -m piper_train.export_onnx \ --no-stochastic /path/to/checkpoint.ckpt /path/to/output.onnx
問題: dotnet コマンドが認識されない
解決策: .NET 10 SDK 以上をインストールしてください:
問題: 中国語/スペイン語/フランス語/ポルトガル語の G2P でエラーが発生
解決策: NuGet パッケージの復元を実行:
dotnet restore src/csharp/PiperPlus.sln問題: モデル読み込み時に ONNX Runtime エラー
解決策:
- Microsoft.ML.OnnxRuntime.Managed v1.24.3 が必要
- GPU版を使用する場合は Microsoft.ML.OnnxRuntime.Gpu に変更