Metadata-Version: 2.4
Name: shiba-svc
Version: 1.0.0
Summary: An easy to understand HiFiSinger SVC training and inference framework
Author: ShiromiyaG
Maintainer: ShiromiyaG
License-Expression: MIT
Project-URL: Homepage, https://github.com/ShiromiyaG/ShibaSVC
Project-URL: Repository, https://github.com/ShiromiyaG/ShibaSVC
Project-URL: Issues, https://github.com/ShiromiyaG/ShibaSVC/issues
Project-URL: Documentation, https://github.com/ShiromiyaG/ShibaSVC/tree/main/docs
Keywords: audio,singing-voice-conversion,speech,pytorch
Classifier: Development Status :: 5 - Production/Stable
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Sound/Audio
Requires-Python: <3.13,>=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: THIRD_PARTY_NOTICES.md
Requires-Dist: numpy<2.0,>=1.26.4
Requires-Dist: scipy<2.0,>=1.11.4
Requires-Dist: llvmlite<1.0,>=0.42.0
Requires-Dist: praat-parselmouth<1.0.0,>=0.4.3
Requires-Dist: soundfile<1.0.0,>=0.12.1
Requires-Dist: librosa<1.0.0,>=0.10.2
Requires-Dist: numba<1.0.0,>=0.59.0
Requires-Dist: resampy<1.0,>=0.4.2
Requires-Dist: pyloudnorm<1.0,>=0.1.1
Requires-Dist: nnAudio<0.4,>=0.3.4
Requires-Dist: PyWavelets<2.0,>=1.4.1
Requires-Dist: h5py<4.0,>=3.10.0
Requires-Dist: scikit-learn<2.0,>=1.3.2
Requires-Dist: scikit-image<1.0,>=0.22.0
Requires-Dist: matplotlib<4.0,>=3.8.0
Requires-Dist: Pillow<12.0,>=10.0.0
Requires-Dist: requests<3.0,>=2.28.1
Requires-Dist: filelock<4.0,>=3.12.0
Requires-Dist: schedulefree<2.0,>=1.4
Requires-Dist: safetensors<1.0,>=0.4
Requires-Dist: tqdm<5.0,>=4.64.1
Requires-Dist: PyYAML<7.0,>=6.0.1
Requires-Dist: transformers>=4.33.3
Requires-Dist: torchcrepe>=0.0.24
Requires-Dist: rich<16.0,>=13.7
Requires-Dist: mmengine==0.7.3
Requires-Dist: loguru<1.0.0,>=0.6.0
Requires-Dist: click<9.0.0,>=8.1.3
Requires-Dist: tensorboard<3.0.0,>=2.14.0
Requires-Dist: pyworld<1.0,>=0.3.5
Requires-Dist: pykakasi<3.0.0,>=2.2.1
Requires-Dist: gradio==6.20.0
Requires-Dist: torch==2.11.0
Requires-Dist: torchaudio==2.11.0
Requires-Dist: pytorch-lightning==2.6.5
Provides-Extra: dev
Requires-Dist: isort<7.0,>=5.12.0; extra == "dev"
Requires-Dist: black<26.0,>=24.10.0; extra == "dev"
Requires-Dist: pytest<10.0,>=8.3.0; extra == "dev"
Requires-Dist: pre-commit<5.0,>=3.3.3; extra == "dev"
Requires-Dist: build<2.0,>=1.2; extra == "dev"
Provides-Extra: api
Requires-Dist: flask<4.0,>=3.1; extra == "api"
Requires-Dist: flask-cors<7.0,>=5.0; extra == "api"
Dynamic: license-file

# ShibaSVC

<p align="center">
  <img src="shiba_svc/gui/assets/logo.png" alt="ShibaSVC logo" width="256" />
</p>

ShibaSVC is a local singing-voice conversion toolkit focused on practical
HiFiSinger training and inference. It provides a Gradio GUI and command-line
tools for dataset preparation, compact feature extraction, training, and
conversion.

## Highlights

- HiFiSinger with HiFiGAN, RefineGAN, MS-Wavehax, and Shiba HarmonicRaw
  decoder configurations.
- ContentVec and optional R-SPIN content features, plus RMVPE and other pitch
  extractors.
- Local-first model assets; opening the GUI never starts a download.
- Physical batch 8 profiles designed for an 8 GB GPU, including branchwise
  HarmonicRaw discriminator training.
- Tensor-only Safetensors exports with embedded resolved configuration.
- Explicit safe checkpoint loading with PyTorch's tensor-oriented
  `weights_only` policy.
- Rich terminal progress and structured log/progress events in the GUI.

## Quick start

Python 3.12 is required. Installing from source is recommended for GPU users
because the provided installer selects the PyTorch wheel index explicitly. On
Linux:

```bash
./install.sh
./run.sh
```

On Windows, run `install.bat` and then `run.bat`. Native Windows uses eager
CUDA for maximum compatibility; use WSL2 when `torch.compile` fusion is
required. For CPU-only PyTorch, use `./install.sh --cpu` or
`install.bat --cpu`.

After the first PyPI release, the packaged GUI can instead be installed with
`python -m pip install shiba-svc` and launched with `shiba-svc`. Install the
desired CPU/CUDA build of PyTorch first. See the installation guide for the
complete PyPI, GitHub source archive, CUDA, and Windows instructions.

The GUI contains Conversion, Dataset preparation, Feature extraction, and
Training tabs. It discovers datasets below `assets/datasets/` and checkpoints
in the local model directories. Pretrained checkpoints can be placed in
`pretrained/` or selected by path in the Training tab.

## Documentation

- [Installation from PyPI or source, GPU setup, and development](docs/installation.md)
- [Dataset preparation and feature extraction](docs/dataset.md)
- [Training, checkpoints, and decoder profiles](docs/training.md)
- [Troubleshooting](docs/troubleshooting.md)
- [Preflight, manifests, Safetensors, and release publishing](docs/workflows.md)
- [Command-line reference](docs/cli.md)

## Inference

Safetensors inference exports contain their model and preprocessing
configuration:

```bash
shiba-svc-infer \
  --checkpoint logs/my_voice/epoch=59-step=13520-valid_loss=0.92.inference.safetensors \
  --input input.wav \
  --output output.wav
```

Pass `--config` for a legacy or full checkpoint without embedded metadata.
Inference supports pitch adjustment, ContentVec/R-SPIN selection, output
normalization, reference-style strength, and optional target-content
retrieval. CUDA resources are released after each GUI conversion.

## Repository layout

```text
shiba_svc/                 # Python package
  configs/                 # packaged model/training configurations
  gui/                     # Gradio application and visual assets
  cli/                     # installed command-line implementations
assets/datasets/           # source datasets used by the GUI
logs/                      # prepared data, TensorBoard, and checkpoints
pretrained/                # explicitly downloaded/cached model assets
examples/                  # manual workflows requiring local assets
docs/                      # task-oriented documentation
tools/                     # compatibility wrappers for older commands
```

## Tests

```bash
python -m pytest -q
```

Manual model and visualization workflows that require external checkpoints or
audio live under `examples/` and are not collected by pytest.

## Attribution and responsible use

ShibaSVC is based on the [Fish Diffusion](https://github.com/fishaudio/fish-diffusion)
codebase. Shiba HarmonicRaw is an independent decoder influenced by the
alias-control ideas described in
[Aliasing-Free Neural Audio Synthesis](https://arxiv.org/abs/2512.20211); it is
not the official Pupu-Vocoder implementation. See
[Third-party notices](THIRD_PARTY_NOTICES.md) for the exact relationship and
upstream licenses.

Use only audio for which you have the necessary rights and permissions. Voice
conversion can be misused for impersonation; disclose generated or converted
audio where appropriate and follow applicable laws and platform rules.
