$ show RVC-Boss/GPT-SoVITS
GPT-SoVITS is a production-grade text-to-speech and voice conversion system with a Gradio-based WebUI and FastAPI REST API. It supports zero-shot voice cloning from a 5-second reference audio and few-shot fine-tuning with 1 minute of data. The system integrates multiple model versions (v1–v4, v2Pro, v2ProPlus) with autoregressive (GPT-style) and non-autoregressive (SoVITS/CFM) components, plus a BigVGAN vocoder. It includes a full pipeline for dataset preparation (voice separation, ASR, text labeling), training (with DDP, LoRA, DPO), and inference (streaming, parallel, ONNX/TorchScript export). The codebase is heavily modular with reusable text frontends for Chinese, Japanese, Korean, Cantonese, and English, as well as audio processing tools (UVR5, BS-Roformer, AP-BWE). Despite its breadth, the code exhibits significant technical debt: version sprawl, hardcoded paths, global state, and experimental hacks. It is actively maintained with frequent bug fixes and feature additions.
The LLM identified 5 files worth highlighting for reuse:
A modular Chinese text normalization pipeline derived from PaddleSpeech. Handles number, date, percentage, and other NSW conversions with rule-based and regex patterns. Each normalization step is in a separate file (num.py, chronology.py, phonecode.py, etc.), making it easy to reuse or extend for other Chinese TTS systems.
Implementation of NVIDIA's BigVGAN vocoder with anti-aliased periodic activation (Snake/SnakeBeta) and multi-period discriminator. The model is self-contained with weight normalization and can be used as a standalone neural vocoder for any mel-spectrogram-to-waveform task.
ScaledAdam optimizer with per-parameter scaling, gradient clipping, and batched parameter updates. Designed for large-scale transformer training, it provides a drop-in replacement for AdamW with additional stability features. The implementation is isolated and can be reused in any PyTorch project.
Collection of flow-based transformation modules: ResidualCouplingLayer, ConvFlow, ElementwiseAffine, ActNorm, InvConvNear. These are building blocks for normalizing flows and are used in the SoVITS decoder. Each module is self-contained with clear interfaces, suitable for reuse in other flow-based generative models.
Mel-band RoFormer model for audio source separation. Uses a band-split approach with rotary position embeddings and complex spectrogram masking. The model architecture is standalone and can be applied to other separation tasks (e.g., speech denoising) with minimal adaptation.