# plachtaa/seed-vc architecture

> Architecture diagram of the GitHub repository plachtaa/seed-vc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/plachtaa/seed-vc
- Repository: https://github.com/plachtaa/seed-vc

## Overview

Seed-VC provides zero-shot voice, singing-voice, and real-time conversion, plus V2 style conversion and custom-data fine-tuning. The main workflow takes source speech and a target voice reference through a selected model runtime and produces converted audio. The graph separates V1/V2 inference, shared audio and model components, interfaces, and training. Some UI and training details are represented from documented capabilities and the file tree; their internal wiring is not asserted where source excerpts do not show it.

Main entry points: [`inference.py`](https://github.com/plachtaa/seed-vc/blob/main/inference.py) (V1 inference), [`modules/v2/vc_wrapper.py`](https://github.com/plachtaa/seed-vc/blob/main/modules/v2/vc_wrapper.py) (V2 conversion wrapper), [`seed_vc_wrapper.py`](https://github.com/plachtaa/seed-vc/blob/main/seed_vc_wrapper.py) (V1 conversion wrapper), [`modules/commons.py`](https://github.com/plachtaa/seed-vc/blob/main/modules/commons.py) (Shared model operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_web_ui["Voice conversion UI<br/>[app_vc.py]"]
  node_combined_ui["V1/V2 demo UI<br/>[app.py]"]
  node_realtime_ui["Real-time UI<br/>[real-time-gui.py]"]
end

subgraph group_runtime["Conversion runtime"]
  node_v1_cli["V1 inference<br/>[inference.py]"]
  node_v1_wrapper["V1 conversion wrapper<br/>[seed_vc_wrapper.py]"]
  node_v2_cli["V2 inference<br/>[inference_v2.py]"]
  node_v2_wrapper["V2 conversion wrapper<br/>[vc_wrapper.py]"]
end

subgraph group_models["Model components"]
  node_audio_features["Audio features<br/>[audio.py]"]
  node_pitch["Pitch extraction<br/>[rmvpe.py]"]
  node_speaker["Speaker embedding<br/>[DTDNN.py]"]
  node_shared_ops["Shared model operations<br/>[commons.py]"]
  node_v1_diffusion["V1 diffusion model"]
  node_flow["Flow matching<br/>[flow_matching.py]"]
  node_length["Length regulation"]
  node_v2_content["ASTRAL content encoding<br/>[bsq.py]"]
  node_v2_ar["Style AR model<br/>[ar.py]"]
  node_v2_cfm["V2 flow model<br/>[cfm.py]"]
  node_v2_model["V2 DiT model<br/>[dit_model.py]"]
end

subgraph group_audio["Audio synthesis"]
  node_bigvgan["BigVGAN vocoder<br/>[bigvgan.py]"]
  node_hifigan["HiFiGAN vocoder<br/>[generator.py]"]
  node_encodec["Encodec codec<br/>[encodec.py]"]
  node_audio_result["Converted audio"]
end

subgraph group_training["Fine-tuning"]
  node_train_v1["V1 fine-tuning<br/>[train.py]"]
  node_train_v2["V2 fine-tuning<br/>[train_v2.py]"]
  node_dataset["Fine-tuning dataset<br/>[ft_dataset.py]"]
end

node_user(("Audio user"))
node_reference["Reference speech"]

node_user -->|"provides audio"| node_v1_cli
node_reference -->|"provides voice reference"| node_v1_cli
node_v1_cli -->|"extracts mel features"| node_audio_features
node_v1_cli -->|"extracts pitch"| node_pitch
node_v1_cli -->|"loads speaker model"| node_speaker
node_v1_cli -->|"loads vocoder"| node_bigvgan
node_v1_cli -->|"loads vocoder"| node_hifigan
node_v1_cli -->|"writes conversion"| node_audio_result
node_user -->|"provides audio"| node_v2_cli
node_reference -->|"provides voice reference"| node_v2_cli
node_v2_cli -->|"runs conversion"| node_v2_wrapper
node_v2_wrapper -->|"uses content encoder"| node_v2_content
node_v2_wrapper -->|"uses style model"| node_v2_ar
node_v2_wrapper -->|"uses flow model"| node_v2_cfm
node_v2_wrapper -->|"streams audio"| node_audio_result
node_web_ui -->|"invokes conversion"| node_v1_wrapper
node_combined_ui -->|"invokes conversion"| node_v1_wrapper
node_combined_ui -->|"invokes conversion"| node_v2_wrapper
node_realtime_ui -.->|"streams conversion"| node_audio_result
node_v1_wrapper -->|"uses audio processing"| node_audio_features
node_v1_wrapper -->|"uses pitch extractor"| node_pitch
node_v1_wrapper -->|"uses speaker model"| node_speaker
node_v1_wrapper -->|"uses vocoder"| node_bigvgan
node_v1_cli -->|"uses model utilities"| node_shared_ops
node_shared_ops -->|"imports flow matching"| node_flow
node_shared_ops -->|"imports length regulation"| node_length
node_v1_cli -->|"constructs model"| node_v1_diffusion
node_v1_cli -->|"synthesizes speech"| node_audio_result
node_v2_wrapper -.->|"uses vocoder"| node_bigvgan
node_train_v1 -.->|"loads training data"| node_dataset
node_train_v2 -.->|"loads training data"| node_dataset
node_user -->|"fine-tunes model"| node_train_v1
node_user -->|"fine-tunes model"| node_train_v2
node_v2_wrapper -.->|"uses DiT model"| node_v2_model
node_v1_cli -.->|"optional codec path"| node_encodec

click node_v1_cli "https://github.com/plachtaa/seed-vc/blob/main/inference.py"
click node_v1_wrapper "https://github.com/plachtaa/seed-vc/blob/main/seed_vc_wrapper.py"
click node_v2_cli "https://github.com/plachtaa/seed-vc/blob/main/inference_v2.py"
click node_v2_wrapper "https://github.com/plachtaa/seed-vc/blob/main/modules/v2/vc_wrapper.py"
click node_web_ui "https://github.com/plachtaa/seed-vc/blob/main/app_vc.py"
click node_combined_ui "https://github.com/plachtaa/seed-vc/blob/main/app.py"
click node_realtime_ui "https://github.com/plachtaa/seed-vc/blob/main/real-time-gui.py"
click node_audio_features "https://github.com/plachtaa/seed-vc/blob/main/modules/audio.py"
click node_pitch "https://github.com/plachtaa/seed-vc/blob/main/modules/rmvpe.py"
click node_speaker "https://github.com/plachtaa/seed-vc/blob/main/modules/campplus/DTDNN.py"
click node_shared_ops "https://github.com/plachtaa/seed-vc/blob/main/modules/commons.py"
click node_v1_diffusion "https://github.com/plachtaa/seed-vc/blob/main/modules/diffusion_transformer.py"
click node_flow "https://github.com/plachtaa/seed-vc/blob/main/modules/flow_matching.py"
click node_length "https://github.com/plachtaa/seed-vc/blob/main/modules/length_regulator.py"
click node_v2_content "https://github.com/plachtaa/seed-vc/blob/main/modules/astral_quantization/bsq.py"
click node_v2_ar "https://github.com/plachtaa/seed-vc/blob/main/modules/v2/ar.py"
click node_v2_cfm "https://github.com/plachtaa/seed-vc/blob/main/modules/v2/cfm.py"
click node_v2_model "https://github.com/plachtaa/seed-vc/blob/main/modules/v2/dit_model.py"
click node_bigvgan "https://github.com/plachtaa/seed-vc/blob/main/modules/bigvgan/bigvgan.py"
click node_hifigan "https://github.com/plachtaa/seed-vc/blob/main/modules/hifigan/generator.py"
click node_encodec "https://github.com/plachtaa/seed-vc/blob/main/modules/encodec.py"
click node_train_v1 "https://github.com/plachtaa/seed-vc/blob/main/train.py"
click node_train_v2 "https://github.com/plachtaa/seed-vc/blob/main/train_v2.py"
click node_dataset "https://github.com/plachtaa/seed-vc/blob/main/data/ft_dataset.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_web_ui,node_combined_ui,node_realtime_ui,node_user toneBlue
class node_v1_cli,node_v1_wrapper,node_v2_cli,node_v2_wrapper toneAmber
class node_audio_features,node_pitch,node_speaker,node_shared_ops,node_v1_diffusion,node_flow,node_length,node_v2_content,node_v2_ar,node_v2_cfm,node_v2_model toneMint
class node_bigvgan,node_hifigan,node_encodec,node_audio_result toneRose
class node_train_v1,node_train_v2,node_dataset,node_reference toneIndigo
```

## Components

### User interfaces

- [Voice conversion UI](https://github.com/plachtaa/seed-vc/blob/main/app_vc.py): `app_vc.py`
- [V1/V2 demo UI](https://github.com/plachtaa/seed-vc/blob/main/app.py): `app.py`
- [Real-time UI](https://github.com/plachtaa/seed-vc/blob/main/real-time-gui.py): `real-time-gui.py`

### Conversion runtime

- [V1 inference](https://github.com/plachtaa/seed-vc/blob/main/inference.py): `inference.py`
- [V1 conversion wrapper](https://github.com/plachtaa/seed-vc/blob/main/seed_vc_wrapper.py): `seed_vc_wrapper.py`
- [V2 inference](https://github.com/plachtaa/seed-vc/blob/main/inference_v2.py): `inference_v2.py`
- [V2 conversion wrapper](https://github.com/plachtaa/seed-vc/blob/main/modules/v2/vc_wrapper.py): `modules/v2/vc_wrapper.py`

### Model components

- [Audio features](https://github.com/plachtaa/seed-vc/blob/main/modules/audio.py): `modules/audio.py`
- [Pitch extraction](https://github.com/plachtaa/seed-vc/blob/main/modules/rmvpe.py): `modules/rmvpe.py`
- [Speaker embedding](https://github.com/plachtaa/seed-vc/blob/main/modules/campplus/DTDNN.py): `modules/campplus/DTDNN.py`
- [Shared model operations](https://github.com/plachtaa/seed-vc/blob/main/modules/commons.py): `modules/commons.py`
- [V1 diffusion model](https://github.com/plachtaa/seed-vc/blob/main/modules/diffusion_transformer.py): `modules/diffusion_transformer.py`
- [Flow matching](https://github.com/plachtaa/seed-vc/blob/main/modules/flow_matching.py): `modules/flow_matching.py`
- [Length regulation](https://github.com/plachtaa/seed-vc/blob/main/modules/length_regulator.py): `modules/length_regulator.py`
- [ASTRAL content encoding](https://github.com/plachtaa/seed-vc/blob/main/modules/astral_quantization/bsq.py): `modules/astral_quantization/bsq.py`
- [Style AR model](https://github.com/plachtaa/seed-vc/blob/main/modules/v2/ar.py): `modules/v2/ar.py`
- [V2 flow model](https://github.com/plachtaa/seed-vc/blob/main/modules/v2/cfm.py): `modules/v2/cfm.py`
- [V2 DiT model](https://github.com/plachtaa/seed-vc/blob/main/modules/v2/dit_model.py): `modules/v2/dit_model.py`

### Audio synthesis

- [BigVGAN vocoder](https://github.com/plachtaa/seed-vc/blob/main/modules/bigvgan/bigvgan.py): `modules/bigvgan/bigvgan.py`
- [HiFiGAN vocoder](https://github.com/plachtaa/seed-vc/blob/main/modules/hifigan/generator.py): `modules/hifigan/generator.py`
- [Encodec codec](https://github.com/plachtaa/seed-vc/blob/main/modules/encodec.py): `modules/encodec.py`
- **Converted audio**

### Fine-tuning

- [V1 fine-tuning](https://github.com/plachtaa/seed-vc/blob/main/train.py): `train.py`
- [V2 fine-tuning](https://github.com/plachtaa/seed-vc/blob/main/train_v2.py): `train_v2.py`
- [Fine-tuning dataset](https://github.com/plachtaa/seed-vc/blob/main/data/ft_dataset.py): `data/ft_dataset.py`

### Other components

- **Audio user**
- **Reference speech**

## Connections

- Audio user → V1 inference: provides audio (evidence: `README.md`)
- Reference speech → V1 inference: provides voice reference (evidence: `README.md`)
- V1 inference → Audio features: extracts mel features (evidence: `inference.py`)
- V1 inference → Pitch extraction: extracts pitch (evidence: `inference.py`)
- V1 inference → Speaker embedding: loads speaker model (evidence: `inference.py`)
- V1 inference → BigVGAN vocoder: loads vocoder (evidence: `inference.py`)
- V1 inference → HiFiGAN vocoder: loads vocoder (evidence: `inference.py`)
- V1 inference → Converted audio: writes conversion (evidence: `README.md`)
- Audio user → V2 inference: provides audio (evidence: `README.md`)
- Reference speech → V2 inference: provides voice reference (evidence: `README.md`)
- V2 inference → V2 conversion wrapper: runs conversion (evidence: `inference_v2.py`)
- V2 conversion wrapper → ASTRAL content encoding: uses content encoder (evidence: `modules/v2/vc_wrapper.py`)
- V2 conversion wrapper → Style AR model: uses style model (evidence: `modules/v2/vc_wrapper.py`)
- V2 conversion wrapper → V2 flow model: uses flow model (evidence: `modules/v2/vc_wrapper.py`)
- V2 conversion wrapper → Converted audio: streams audio (evidence: `modules/v2/vc_wrapper.py`)
- Voice conversion UI → V1 conversion wrapper: invokes conversion (evidence: `README.md`)
- V1/V2 demo UI → V1 conversion wrapper: invokes conversion (evidence: `app.py`)
- V1/V2 demo UI → V2 conversion wrapper: invokes conversion (evidence: `app.py`)
- Real-time UI → Converted audio: streams conversion
- V1 conversion wrapper → Audio features: uses audio processing (evidence: `seed_vc_wrapper.py`)
- V1 conversion wrapper → Pitch extraction: uses pitch extractor (evidence: `seed_vc_wrapper.py`)
- V1 conversion wrapper → Speaker embedding: uses speaker model (evidence: `seed_vc_wrapper.py`)
- V1 conversion wrapper → BigVGAN vocoder: uses vocoder (evidence: `seed_vc_wrapper.py`)
- V1 inference → Shared model operations: uses model utilities (evidence: `inference.py`)
- Shared model operations → Flow matching: imports flow matching (evidence: `modules/commons.py`)
- Shared model operations → Length regulation: imports length regulation (evidence: `modules/commons.py`)
- V1 inference → V1 diffusion model: constructs model (evidence: `inference.py`)
- V1 inference → Converted audio: synthesizes speech (evidence: `README.md`)
- V2 conversion wrapper → BigVGAN vocoder: uses vocoder
- V1 fine-tuning → Fine-tuning dataset: loads training data
- V2 fine-tuning → Fine-tuning dataset: loads training data
- Audio user → V1 fine-tuning: fine-tunes model (evidence: `README.md`)
- Audio user → V2 fine-tuning: fine-tunes model (evidence: `README.md`)
- V2 conversion wrapper → V2 DiT model: uses DiT model
- V1 inference → Encodec codec: optional codec path
