Restore SVC models disguised as OpenUTAU/DiffSinger voicebanks
Project description
ds2svc
Restore SVC models that have been disguised as OpenUTAU-compatible DiffSinger voicebanks, and run inference on the recovered model.
Some packed "DiffSinger" voicebanks in the wild are not DiffSinger at all — they
are existing SVC models (RVC, DDSP-SVC) repackaged to run on a DiffSinger ONNX
API. This harms the open community's trust and safety. ds2svc identifies such
banks, extracts the genuine SVC model back out, and provides inference.
What it does
- Detect — load a voicebank ZIP, read its yaml manifest, and inspect the ONNX graph internals (not just config) to decide whether it is a legitimate DiffSinger bank or a disguised SVC model.
- Extract (in progress) — recover the SVC ONNX with clean inputs
(
cvec_units+f0). - Infer (planned) — Streamlit WebUI + realtime inference.
Supported disguises:
| Source | Based on | Disguise | Genuine model recovered |
|---|---|---|---|
| UTAI | RVC | RVC packed as a "vocoder" | (units[768], f0) → waveform |
| DDSP-SVS | DDSP-SVC | DDSP-SVC packed inside the "acoustic" model | (units[768], f0, volume) → mel → pc-nsf-hifigan |
Detection signatures
Detection trusts the ONNX graph, not the config (config fields are easy to fake, and unusual-but-legit banks exist):
- UTAI / RVC — the payload graph contains a normalizing flow (
net_g/flow) besidenet_g/enc_pand an NSF decodernet_g/dec: the RVCSynthesizerTrn. - DDSP-SVS — the acoustic graph contains a real
STFTop (legit DiffSinger acoustics have none) plusddsp_model/unit2ctrl,istft_method,melext, and abackend_reflowReFlow stage. - DSP ops alone (
Sin/Cos/CumSum/RandomNormalLike) are not used — they also appear in genuine DiffSinger diffusion backbones.
Usage
pip install -e .[infer,realtime]
ds2svc detect path/to/bank.zip
ds2svc extract path/to/bank.zip --out artifacts/<id>
ds2svc infer artifacts/<id> --in vocal.wav --out converted.wav --f0 fcpe
ds2svc realtime artifacts/<id>
See MANUAL_DOWNLOADS.md for offline weight installation.
Status
- Voicebank ZIP reader + manifest resolver (paths resolved relative to yaml)
- ONNX graph probe + detection (RVC / DDSP-SVS / legit)
- UTAI/RVC extraction — graph-surgery excision of the empty-index
TopKchain, input renamemel→cvec_units. Output:(cvec_units[1,T,768], f0[1,T]) → waveform[1,N]at 44.1 kHz,net_g(encoder + flow + NSF decoder) preserved byte-for-byte. - DDSP-SVS extraction — bit-lossless weight-port into a rebuilt
Unit2Wav(CombSubSuperFast+RectifiedFlow/LYNXNet2), re-exported as a single ONNX(cvec_units[1,T,768], f0[1,T], volume[1,T]) → mel[1,T,128](ReFlow loop baked in). Pair withpc-nsf-hifiganfor audio; the mel→wav stage can later be merged into this graph for a one-shot audio-output model. - Inference frontend — ContentVec (
lengyue233/content-vec-best), f0 (fcpe/rmvpe), volume, pc-nsf-hifigan vocoder, and a unifiedload_model(ModelDir) → infer(audio, sr, key_shift, f0_method)that auto-selects RVC or DDSP path fromds2svc_meta.json. - Realtime GUI — FreeSimpleGUI + sounddevice stream with sliding
buffer, SOLA crossfade, correlation-based overlap alignment, f0=fcpe
default.
ds2svc realtime <model_dir>. - Streamlit WebUI — drag-drop vocal WAV → convert → preview + download.
Auto-caches model, persists output across re-renders.
streamlit run ds2svc/webui/app.py - Manual download guide for offline weight placement, with per-file URLs and directory layout.
See PLAN.md for the full design.
Development
Tests reference private voicebanks by anonymized IDs. Copy
tests/fixtures/local_banks.example.json → local_banks.json (gitignored) and
point the IDs at your local archives, then:
pytest
License
MIT. This project is for community safety and lawful recovery of open or self-owned models. Respect the licenses of upstream RVC / DDSP-SVC / DiffSinger.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ds2svc-0.1.0.tar.gz.
File metadata
- Download URL: ds2svc-0.1.0.tar.gz
- Upload date:
- Size: 57.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17cefc6858879c55af0487f9ad20b675f9fe4fc0b459b162829b846c67df6512
|
|
| MD5 |
e837ea8836ba687e9f1f53efe0d31ef9
|
|
| BLAKE2b-256 |
b2695ba73ae297fa09ad163ab6adc2e1c06ece7d1c2811ee00496d3c9a217182
|
Provenance
The following attestation bundles were made for ds2svc-0.1.0.tar.gz:
Publisher:
python-publish.yml on KakaruHayate/ds2svc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ds2svc-0.1.0.tar.gz -
Subject digest:
17cefc6858879c55af0487f9ad20b675f9fe4fc0b459b162829b846c67df6512 - Sigstore transparency entry: 1839535014
- Sigstore integration time:
-
Permalink:
KakaruHayate/ds2svc@685f5094f1a9b0f33b434a7412b28e179487b12b -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/KakaruHayate
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@685f5094f1a9b0f33b434a7412b28e179487b12b -
Trigger Event:
release
-
Statement type:
File details
Details for the file ds2svc-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ds2svc-0.1.0-py3-none-any.whl
- Upload date:
- Size: 61.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e3e344ede6b6a31892346cbcb4df953a98f69555c1f139307bb6c91283eebaf
|
|
| MD5 |
58353720c2ff07a3b3bcc8ec706d8ee3
|
|
| BLAKE2b-256 |
ffa5fec14062c0c7d724f36aac9c315e742a321364d0992f4927f42d0625a348
|
Provenance
The following attestation bundles were made for ds2svc-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on KakaruHayate/ds2svc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ds2svc-0.1.0-py3-none-any.whl -
Subject digest:
6e3e344ede6b6a31892346cbcb4df953a98f69555c1f139307bb6c91283eebaf - Sigstore transparency entry: 1839535063
- Sigstore integration time:
-
Permalink:
KakaruHayate/ds2svc@685f5094f1a9b0f33b434a7412b28e179487b12b -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/KakaruHayate
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@685f5094f1a9b0f33b434a7412b28e179487b12b -
Trigger Event:
release
-
Statement type: