Skip to content

Repository files navigation

ShiroRVC

There still aren't any pretrains for RefineGAN v2.

Turn one voice into another — speaking or singing.

Record yourself, convert it to a voice you have trained, and keep the melody, the timing and the emotion of the original performance. Runs on your own computer, or on a free cloud GPU.

Python PyTorch Gradio License

Open in Colab


What you can do with it

  • Convert a voice — one file or a whole folder at once. Singing works as well as speech, and you can nudge the pitch curve by hand if a note lands wrong.
  • Train your own voice — feed it clean recordings of someone and get a model you can use forever after.
  • Type and hear it spoken — text-to-speech routed through any voice you have.
  • Blend two voices — mix two models into a third one that sounds like both.
  • Bring in voices from elsewhere — paste a link, drop in files you already have, or download ready-made starting points.

Getting started

WindowsLinux
git clone https://github.com/ShiromiyaG/ShiroRVC.git
cd ShiroRVC
run-install.bat
start-gui.bat
git clone https://github.com/ShiromiyaG/ShiroRVC.git
cd ShiroRVC
chmod +x run-install.sh start-gui.sh
./run-install.sh
./start-gui.sh

This builds a self-contained environment in env/. Nothing is installed system-wide and no Python you already have is touched. The models it needs download by themselves the first time you launch it. Set aside about 14 GB of disk space.

To update later, run git pull inside the folder. If requirements.txt changed, run the installer script again so the environment picks up the new requirements.

Note — do not run either script as administrator or root. Both write into the project folder, and doing so leaves files your normal user cannot change afterwards.

Installing into an existing Python environment

Cloud GPU templates (RunPod, Vast.ai, Jupyter images) usually come with their own torch. Running pip install -r requirements.txt there replaces torch but leaves the template's torchaudio, and the two end up built for different CUDA versions. When that happens, the app stops at startup with PyTorch and TorchAudio were compiled with different CUDA versions. To avoid it, remove the preinstalled stack and install it from PyTorch's index first:

pip uninstall -y torch torchaudio torchvision
pip install torch==2.13.0 torchaudio==2.11.0 --index-url https://download.pytorch.org/whl/cu130
pip install -r requirements.txt

These are CUDA 13 builds, so the machine needs NVIDIA driver 580 or newer (nvidia-smi shows the version).

Three ways to use it

All three drive the same engine and share the same logs/ folder, so a voice you train in one shows up immediately in the others.

Start it with Best for
Desktop app start-gui.bat / start-gui.sh Day-to-day use. Waveform editing, live training charts, a graphics-memory meter and a batch queue. If the engine crashes, the window stays up.
In your browser start-gradio.bat / start-gradio.sh Reaching it from another machine, or over a tunnel.
Command line python core.py --help Scripting and automation. The other two are built on top of these commands.

The desktop app lives entirely in gui/ and is optional — deleting that folder leaves the browser version and the command line working.

Training your own voice

Put clean audio in a folder under assets/datasets/, then pick it in the Training tab.

  • Keep the recordings consistent — same microphone, same room, same tone.
  • Cut the silence off the start and end, or let New Automatic cutting do it for you — it detects voice with a neural VAD rather than a loudness threshold.
  • Twenty clean minutes beats two noisy hours. Quality matters far more than quantity.

Behind the scenes, preparation writes two copies of your audio: one at full quality for training and a smaller one used only to analyse pitch. The app offers to delete the smaller copies afterwards, which frees about a third of the space. Say yes unless you plan to redo the analysis with different settings — that step needs them back.

Watching it learn

Drag a model folder onto logs/run_tensorboard_in_model_folder.bat, or on Linux pass it as an argument:

./logs/run_tensorboard_in_model_folder.sh logs/my-model

Charts open in your browser on port 25565, reachable from other machines on your network.

Language

Both interfaces ship in English and Brazilian Portuguese, and start in whatever language your operating system displays. On Windows that is the "Windows display language" and not the format locale — so an English Windows in Brazil gets an English interface with Brazilian number formats, which is what each of those settings actually asks for.

How to change it
Desktop app The Language button at the bottom of the sidebar. It offers to restart, because each part of the window takes its text when it is built.
In your browser Settings → Language, applied next time you start it. Or launch with --language pt_BR.
Either Set RVC_LANGUAGE=pt_BR.

Never having touched the switch is not the same as having chosen English: someone who never opened it keeps following the operating system, while an explicit choice of English survives switching Windows to another language.

The command line stays in English on purpose — the desktop app reads its output, and its messages end up quoted in bug reports.

Helping translate

Catalogs are standard gettext .po files under assets/locales/, so Poedit, Weblate and Crowdin all work on them directly. The toolchain is standard-library only — no Babel and no GNU gettext binaries to install:

python tools/i18n_tool.py extract   # sources -> assets/locales/shiromiya.pot
python tools/i18n_tool.py update    # merge the template into every .po
python tools/i18n_tool.py compile   # .po -> .mo, which is what gets loaded
python tools/i18n_tool.py stats     # what is still untranslated

Adding a language is one entry in LANGUAGES in rvc/lib/i18n.py, then update and compile. Two rules keep it working: install() runs before any widget is built, and no translated string lives at module scope — mark those with N_() and call _() where they are used. tests/test_i18n.py checks the template is current and that placeholders survive translation, because a missing catalog falls back to English silently rather than raising.

Under the hood

The voice engines

ShiroRVC ships two vocoders — the part that turns the model's internal representation back into sound. Both run on the same VITS skeleton (enc_q + flow + c_kl) and are handed the sliced latent z, not a mel.

HiFi-GAN RefineGAN
Sample rates 32 / 40 / 48 kHz 32 kHz
Frontend Original VITS (flow + posterior)
Generator NSF HiFi-GAN Pulse template refined through parallel ResBlocks
Discriminator MPD + MSD (v2) v4 + UnivHD
Decoder size 15.0 M 13.2 M
Discriminator size 71.4 M 39.1 M

HiFi-GAN is the well-tested option inherited from the original RVC, and the right choice if you want results that behave predictably.

RefineGAN is Applio's decoder, ported unchanged and configured for 32 kHz ([5, 4, 4, 4] upsampling against a 320-sample hop). It works the other way around from HiFi-GAN's NSF: instead of upsampling a latent and adding a source, it builds a sine excitation at the full rate, downsamples it into a channel pyramid with Kaiser-windowed resampling, and refines the latent against that pyramid through parallel multi-kernel ResBlocks, concatenating the matching excitation scale at every step.

What you can choose from
Pitch extractionrmvpe · crepe · crepe-tiny · fcpe
Content embedderscontentvec · spin_v2
OptimizersAdamW · Sched-Free AdamW · Muon · Lion
Spectral lossesL1 mel · multi-scale mel
LR schedulersexponential decay per step or epoch · cosine annealing · none
Export formatsWAV · MP3 · FLAC · OGG · M4A

Training writes live TensorBoard diagnostics for KL rate and per-dimension usage, per-module gradient norms, GAN balance and a held-out split that is the only signal able to see overtraining.

Credits

License

Released under the MIT License.