# rvc-project/retrieval-based-voice-conversion-webui architecture

> Architecture diagram of the GitHub repository rvc-project/retrieval-based-voice-conversion-webui, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rvc-project/retrieval-based-voice-conversion-webui
- Repository: https://github.com/rvc-project/retrieval-based-voice-conversion-webui

## Overview

RVC is a voice-conversion application with a WebUI for training and inference, plus a low-latency realtime GUI/VST path. Its principal workflow is selecting a voice model and audio, extracting content and pitch features, optionally retrieving training-set features, then synthesizing converted audio. The repository also includes optional pymss/MSST source separation and a C++ VST worker. Edges rely on README statements and the supplied source index/excerpts; some detailed training and unsampled subsystem wiring is therefore omitted or marked unverified.

Main entry points: [`webui.py`](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/webui.py) (WebUI), [`infer/vc/pipeline.py`](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/infer/vc/pipeline.py) (Conversion pipeline), [`infer/rtrvc.py`](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/infer/rtrvc.py) (RVC synthesis), [`train/train.py`](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/train/train.py) (Model trainer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interfaces"]
  node_webui["WebUI<br/>[webui.py]"]
  node_realtime_gui["Realtime GUI<br/>[realtime_gui.py]"]
  node_config["Runtime config<br/>[config.py]"]
end

subgraph group_conversion["Voice conversion"]
  node_vc_entry["VC interface<br/>[modules.py]"]
  node_vc_pipeline["Conversion pipeline<br/>[pipeline.py]"]
  node_content_encoder["HuBERT features<br/>[hubert.py]"]
  node_pitch_models["Pitch estimators<br/>[rmvpe.py]"]
  node_rvc_model["RVC synthesis<br/>[rtrvc.py]"]
  node_synth_arch["Synthesizer networks<br/>[models.py]"]
  node_cuda_graph["CUDA graph runtime<br/>[cuda_graph.py]"]
end

subgraph group_training["Model training"]
  node_training_data["Training data prep<br/>[preprocess.py]"]
  node_feature_extract["Feature extraction"]
  node_pitch_extract["Pitch extraction<br/>[extract_f0.py]"]
  node_trainer["Model trainer<br/>[train.py]"]
  node_checkpoint["Checkpoint tools<br/>[process_ckpt.py]"]
end

subgraph group_separation["Vocal separation"]
  node_pymss_ui["pymss UI<br/>[pymss_webui.py]"]
  node_separator["Stem separation<br/>[separator.py]"]
  node_model_registry["Separation models<br/>[model_registry.py]"]
  node_model_download["Model downloads<br/>[model_download.py]"]
end

subgraph group_realtime["Realtime plugin"]
  node_worker_client["Worker client<br/>[WorkerClient.cpp]"]
  node_worker["Python worker<br/>[rvc_worker.py]"]
end

node_user(("User"))
node_audio_actor(("Audio host"))
node_model_store[("Model files")]

node_user -->|"operates"| node_webui
node_webui -->|"loads settings"| node_config
node_webui -->|"invokes conversion"| node_vc_entry
node_webui -.->|"starts training"| node_trainer
node_webui -->|"processes checkpoints"| node_checkpoint
node_webui -->|"offers separation"| node_pymss_ui
node_user -->|"operates"| node_realtime_gui
node_training_data -.->|"prepares audio"| node_feature_extract
node_training_data -.->|"prepares audio"| node_pitch_extract
node_feature_extract -.->|"supplies features"| node_trainer
node_pitch_extract -.->|"supplies pitch"| node_trainer
node_trainer -->|"saves model"| node_checkpoint
node_vc_entry -->|"runs pipeline"| node_vc_pipeline
node_vc_pipeline -->|"extracts features"| node_content_encoder
node_vc_pipeline -.->|"estimates pitch"| node_pitch_models
node_vc_entry -->|"loads conversion model"| node_rvc_model
node_rvc_model -->|"builds synthesizer"| node_synth_arch
node_vc_pipeline -->|"uses acceleration"| node_cuda_graph
node_rvc_model -->|"uses pitch estimation"| node_pitch_models
node_pymss_ui -.->|"runs separation"| node_separator
node_separator -->|"resolves models"| node_model_registry
node_model_registry -->|"requests downloads"| node_model_download
node_model_download -.->|"stores weights"| node_model_store
node_audio_actor -.->|"streams audio"| node_worker_client
node_worker_client -.->|"dispatches blocks"| node_worker
node_worker -->|"loads settings"| node_config
node_worker -->|"runs conversion"| node_rvc_model
node_worker_client -.->|"returns audio"| node_audio_actor
node_webui -->|"uses voice models"| node_model_store

click node_webui "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/webui.py"
click node_realtime_gui "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/realtime_gui.py"
click node_config "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/configs/config.py"
click node_training_data "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/train/preprocess.py"
click node_feature_extract "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/train/dataset/extract_hubert_feature.py"
click node_pitch_extract "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/train/dataset/extract_f0.py"
click node_trainer "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/train/train.py"
click node_checkpoint "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/train/process_ckpt.py"
click node_vc_entry "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/infer/vc/modules.py"
click node_vc_pipeline "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/infer/vc/pipeline.py"
click node_content_encoder "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/infer/hubert.py"
click node_pitch_models "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/infer/rmvpe.py"
click node_rvc_model "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/infer/rtrvc.py"
click node_synth_arch "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/infer/module/models.py"
click node_cuda_graph "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/tools/cuda_graph.py"
click node_pymss_ui "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/tools/pymss_webui.py"
click node_separator "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/tools/pymss/separator.py"
click node_model_registry "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/tools/pymss/model_registry.py"
click node_model_download "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/tools/pymss/model_download.py"
click node_worker_client "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/RVCRealtimeVST/src/WorkerClient.cpp"
click node_worker "https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/RVCRealtimeVST/worker/rvc_worker.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_webui,node_realtime_gui,node_config,node_user toneBlue
class node_vc_entry,node_vc_pipeline,node_content_encoder,node_pitch_models,node_rvc_model,node_synth_arch,node_cuda_graph,node_model_store toneAmber
class node_training_data,node_feature_extract,node_pitch_extract,node_trainer,node_checkpoint toneMint
class node_pymss_ui,node_separator,node_model_registry,node_model_download toneRose
class node_worker_client,node_worker,node_audio_actor toneIndigo
```

## Components

### User interfaces

- [WebUI](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/webui.py): `webui.py`
- [Realtime GUI](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/realtime_gui.py): `realtime_gui.py`
- [Runtime config](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/configs/config.py): `configs/config.py`

### Voice conversion

- [VC interface](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/infer/vc/modules.py): `infer/vc/modules.py`
- [Conversion pipeline](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/infer/vc/pipeline.py): `infer/vc/pipeline.py`
- [HuBERT features](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/infer/hubert.py): `infer/hubert.py`
- [Pitch estimators](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/infer/rmvpe.py): `infer/rmvpe.py`
- [RVC synthesis](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/infer/rtrvc.py): `infer/rtrvc.py`
- [Synthesizer networks](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/infer/module/models.py): `infer/module/models.py`
- [CUDA graph runtime](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/tools/cuda_graph.py): `tools/cuda_graph.py`

### Model training

- [Training data prep](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/train/preprocess.py): `train/preprocess.py`
- [Feature extraction](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/train/dataset/extract_hubert_feature.py): `train/dataset/extract_hubert_feature.py`
- [Pitch extraction](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/train/dataset/extract_f0.py): `train/dataset/extract_f0.py`
- [Model trainer](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/train/train.py): `train/train.py`
- [Checkpoint tools](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/train/process_ckpt.py): `train/process_ckpt.py`

### Vocal separation

- [pymss UI](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/tools/pymss_webui.py): `tools/pymss_webui.py`
- [Stem separation](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/tools/pymss/separator.py): `tools/pymss/separator.py`
- [Separation models](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/tools/pymss/model_registry.py): `tools/pymss/model_registry.py`
- [Model downloads](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/tools/pymss/model_download.py): `tools/pymss/model_download.py`

### Realtime plugin

- [Worker client](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/RVCRealtimeVST/src/WorkerClient.cpp): `RVCRealtimeVST/src/WorkerClient.cpp`
- [Python worker](https://github.com/rvc-project/retrieval-based-voice-conversion-webui/blob/main/RVCRealtimeVST/worker/rvc_worker.py): `RVCRealtimeVST/worker/rvc_worker.py`

### Other components

- **User**
- **Audio host**
- **Model files**

## Connections

- User → WebUI: operates (evidence: `README.md`)
- WebUI → Runtime config: loads settings (evidence: `webui.py`)
- WebUI → VC interface: invokes conversion (evidence: `webui.py`)
- WebUI → Model trainer: starts training
- WebUI → Checkpoint tools: processes checkpoints (evidence: `webui.py`)
- WebUI → pymss UI: offers separation (evidence: `webui.py`)
- User → Realtime GUI: operates (evidence: `README.md`)
- Training data prep → Feature extraction: prepares audio
- Training data prep → Pitch extraction: prepares audio
- Feature extraction → Model trainer: supplies features
- Pitch extraction → Model trainer: supplies pitch
- Model trainer → Checkpoint tools: saves model (evidence: `train/train.py`)
- VC interface → Conversion pipeline: runs pipeline (evidence: `infer/vc/modules.py`)
- Conversion pipeline → HuBERT features: extracts features (evidence: `infer/vc/pipeline.py`)
- Conversion pipeline → Pitch estimators: estimates pitch (evidence: `infer/vc/pipeline.py`)
- VC interface → RVC synthesis: loads conversion model (evidence: `infer/vc/modules.py`)
- RVC synthesis → Synthesizer networks: builds synthesizer (evidence: `infer/rtrvc.py`)
- Conversion pipeline → CUDA graph runtime: uses acceleration (evidence: `infer/vc/pipeline.py`)
- RVC synthesis → Pitch estimators: uses pitch estimation (evidence: `infer/rtrvc.py`)
- pymss UI → Stem separation: runs separation
- Stem separation → Separation models: resolves models (evidence: `tools/pymss/separator.py`)
- Separation models → Model downloads: requests downloads (evidence: `tools/pymss/model_registry.py`)
- Model downloads → Model files: stores weights
- Audio host → Worker client: streams audio
- Worker client → Python worker: dispatches blocks
- Python worker → Runtime config: loads settings (evidence: `RVCRealtimeVST/worker/rvc_worker.py`)
- Python worker → RVC synthesis: runs conversion (evidence: `RVCRealtimeVST/worker/rvc_worker.py`)
- Worker client → Audio host: returns audio
- WebUI → Model files: uses voice models (evidence: `README.md`)
