GPT-SoVITS ONNX DLL Bundle

This Hugging Face repository provides minimal runtime bundles for GPT-SoVITS v2Pro:

  • Rust preprocessing library (Windows DLL / Linux SO)
  • ONNX models (single-file .onnx graphs)
  • Python sample that stitches the DLL helpers + ONNX Runtime sessions

Important: ONNX Runtime is not bundled. Install onnxruntime (CPU) or onnxruntime-gpu.

Directory Layout

Windows bundle

dist/dll_release/
    gpt_sovits_preprocess.dll
    gpt_sovits_preprocess.pdb
    onnx_models/
        cnhubert_base.onnx
        hps.json
        s1v3_prefill.onnx
        s1v3_decode.onnx
        s2Gv2ProPlus_decode.onnx
        sovits_prompt_encoder.onnx
        sv_embedder.onnx
    examples/python_dll_call/
        lib.py
        run_pipeline.py

Linux bundle

dist/dll_release_linux/
    libgpt_sovits_preprocess.so
    onnx_models/
        cnhubert_base.onnx
        hps.json
        s1v3_prefill.onnx
        s1v3_decode.onnx
        s2Gv2ProPlus_decode.onnx
        sovits_prompt_encoder.onnx
        sv_embedder.onnx
    examples/python_dll_call/
        lib.py
        run_pipeline.py

Quick Start (Python)

1. Install dependencies

python -m pip install numpy onnxruntime

For GPU:

python -m pip install numpy onnxruntime-gpu

2. Run (Windows)

python examples\python_dll_call\run_pipeline.py ^
    --dll .\gpt_sovits_preprocess.dll ^
    --sovits-config .\onnx_models\hps.json ^
    --sovits-onnx .\onnx_models\s2Gv2ProPlus_decode.onnx ^
    --prompt-onnx .\onnx_models\sovits_prompt_encoder.onnx ^
    --ssl-onnx .\onnx_models\cnhubert_base.onnx ^
    --sv-onnx .\onnx_models\sv_embedder.onnx ^
    --semantic-prefill .\onnx_models\s1v3_prefill.onnx ^
    --semantic-decode .\onnx_models\s1v3_decode.onnx ^
    --ref-wav C:\path\to\ref.wav ^
    --ref-text "C:\path\to\ref.txt" ^
    --text "こんにちは。" ^
    --output .\outputs\dll_pipeline.wav ^
    --ref-lang all_ja ^
    --text-lang all_ja

3. Run (Linux)

python examples/python_dll_call/run_pipeline.py \
    --dll ./libgpt_sovits_preprocess.so \
    --sovits-config ./onnx_models/hps.json \
    --sovits-onnx ./onnx_models/s2Gv2ProPlus_decode.onnx \
    --prompt-onnx ./onnx_models/sovits_prompt_encoder.onnx \
    --ssl-onnx ./onnx_models/cnhubert_base.onnx \
    --sv-onnx ./onnx_models/sv_embedder.onnx \
    --semantic-prefill ./onnx_models/s1v3_prefill.onnx \
    --semantic-decode ./onnx_models/s1v3_decode.onnx \
    --ref-wav /path/to/ref.wav \
    --ref-text /path/to/ref.txt \
    --text "Hello world." \
    --output ./outputs/dll_pipeline.wav \
    --ref-lang all_en \
    --text-lang all_en

CPU / GPU switching

  • Default: CUDA if available, otherwise CPU.
  • Force CPU:
python examples\python_dll_call\run_pipeline.py --device cpu ...

Required Files

Required:

  • gpt_sovits_preprocess.dll or libgpt_sovits_preprocess.so
  • onnx_models/*.onnx + onnx_models/hps.json
  • examples/python_dll_call/run_pipeline.py

Optional:

  • gpt_sovits_preprocess.pdb (Windows debug symbols)

Notes

  • ONNX files are single-file graphs (no external .onnx.data).
  • Samples are not included. Provide your own reference audio/text.
  • First load can be slow due to model size.

Troubleshooting

  • DLL/SO not found: pass the absolute path via --dll.
  • CUDAExecutionProvider not available: install onnxruntime-gpu or use --device cpu.
  • InvalidArgument / input shape: ensure reference audio is mono. The script will resample.

License

MIT. Derived from GPT-SoVITS: https://github.com/RVC-Boss/GPT-SoVITS

Third-Party Licenses (DLL)

See THIRD_PARTY_LICENSES.txt for the Rust dependency license report used by the DLL bundle.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support