Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,201 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
python_version: "3.10"
|
| 8 |
sdk_version: 6.3.0
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
license: mit
|
| 12 |
-
|
| 13 |
-
- voice-conversion
|
| 14 |
-
- rvc
|
| 15 |
-
- beatrice
|
| 16 |
-
- beatrice-v2
|
| 17 |
-
- audio
|
| 18 |
-
- mcp-server
|
| 19 |
-
short_description: RVC-v2 Beatrice-v2 - CPU inference + training
|
| 20 |
-
---
|
| 21 |
-
|
| 22 |
-
# RVC + Beatrice Voice Conversion
|
| 23 |
-
|
| 24 |
-
**CPU Inference + Training** - Single-file app for HuggingFace Spaces.
|
| 25 |
-
|
| 26 |
-
## Features
|
| 27 |
-
|
| 28 |
-
- **Voice Conversion** - RVC v2 (.pth) + Beatrice v2 (.pt.gz)
|
| 29 |
-
- **Training** - Train both model types (GPU recommended, CPU works but slow)
|
| 30 |
-
- **Single File** - Everything in one `app.py`
|
| 31 |
-
- **CLI Support** - Command-line interface for batch processing
|
| 32 |
-
|
| 33 |
-
## Voice Conversion
|
| 34 |
-
|
| 35 |
-
1. Upload source audio (any format)
|
| 36 |
-
2. Select **Model Type**: RVC v2 or Beatrice v2
|
| 37 |
-
3. Upload model file (.pth for RVC, .pt.gz for Beatrice)
|
| 38 |
-
4. Adjust pitch shift if needed
|
| 39 |
-
5. Click Convert
|
| 40 |
-
|
| 41 |
-
**Default model:** [audo/Benee-RVC](https://huggingface.co/audo/Benee-RVC) (RVC v2)
|
| 42 |
-
|
| 43 |
-
## Training
|
| 44 |
-
|
| 45 |
-
1. Select **Trainer**: RVC v2 or Beatrice v2
|
| 46 |
-
2. Upload training audio (10+ minutes recommended)
|
| 47 |
-
3. Enter model name
|
| 48 |
-
4. Adjust epochs and batch size
|
| 49 |
-
5. Click Start Training
|
| 50 |
-
|
| 51 |
-
**Note:** CPU training works but is slow. For faster training, clone locally with CUDA GPU.
|
| 52 |
-
|
| 53 |
-
## Compatibility
|
| 54 |
-
|
| 55 |
-
- **RVC v1** (256-dim HuBERT) - with f0 or no-f0
|
| 56 |
-
- **RVC v2** (768-dim HuBERT) - with f0 or no-f0
|
| 57 |
-
- **Beatrice v2** - 16kHz input, 24kHz output, per-speaker VQ
|
| 58 |
-
- **Index retrieval** (.index files) for RVC voice matching
|
| 59 |
-
|
| 60 |
-
Model version and f0 flag are auto-detected from the checkpoint.
|
| 61 |
-
|
| 62 |
-
Find models: [HuggingFace](https://huggingface.co/models?search=rvc) | [Weights.gg](https://weights.gg)
|
| 63 |
-
|
| 64 |
-
---
|
| 65 |
-
|
| 66 |
-
## API
|
| 67 |
-
|
| 68 |
-
### Python Client - Voice Conversion
|
| 69 |
-
|
| 70 |
-
```python
|
| 71 |
-
from gradio_client import Client, handle_file
|
| 72 |
-
|
| 73 |
-
client = Client("Luminia/rvc-voice-conversion")
|
| 74 |
-
|
| 75 |
-
# RVC v2 inference
|
| 76 |
-
result = client.predict(
|
| 77 |
-
source_audio=handle_file("voice.wav"),
|
| 78 |
-
model_type="RVC v2",
|
| 79 |
-
model_file=handle_file("model.pth"),
|
| 80 |
-
index_file=None, # Optional .index file
|
| 81 |
-
beatrice_model_file=None, # Not used for RVC
|
| 82 |
-
beatrice_target_speaker=0, # Not used for RVC
|
| 83 |
-
beatrice_formant_shift=0.0, # Not used for RVC
|
| 84 |
-
pitch_shift=0, # -12 to 12 semitones
|
| 85 |
-
f0_method="pm", # "pm" or "harvest"
|
| 86 |
-
index_rate=0.75, # 0-1, voice retrieval strength
|
| 87 |
-
protect=0.33, # 0-0.5, voiceless consonant protection
|
| 88 |
-
api_name="/convert"
|
| 89 |
-
)
|
| 90 |
-
print(result) # (output_path, status_message)
|
| 91 |
-
|
| 92 |
-
# Beatrice v2 inference
|
| 93 |
-
result = client.predict(
|
| 94 |
-
source_audio=handle_file("voice.wav"),
|
| 95 |
-
model_type="Beatrice v2",
|
| 96 |
-
model_file=None, # Not used for Beatrice
|
| 97 |
-
index_file=None, # Not used for Beatrice
|
| 98 |
-
beatrice_model_file=handle_file("beatrice_model.pt.gz"),
|
| 99 |
-
beatrice_target_speaker=0, # Speaker index
|
| 100 |
-
beatrice_formant_shift=0.0, # -2 to 2
|
| 101 |
-
pitch_shift=0, # -12 to 12 semitones
|
| 102 |
-
f0_method="pm", # Ignored for Beatrice
|
| 103 |
-
index_rate=0.75, # Ignored for Beatrice
|
| 104 |
-
protect=0.33, # Ignored for Beatrice
|
| 105 |
-
api_name="/convert"
|
| 106 |
-
)
|
| 107 |
-
print(result) # (output_path, status_message)
|
| 108 |
-
```
|
| 109 |
-
|
| 110 |
-
### Python Client - Training
|
| 111 |
-
|
| 112 |
-
```python
|
| 113 |
-
from gradio_client import Client, handle_file
|
| 114 |
-
|
| 115 |
-
client = Client("Luminia/rvc-voice-conversion")
|
| 116 |
-
|
| 117 |
-
# RVC v2 training
|
| 118 |
-
result = client.predict(
|
| 119 |
-
trainer="RVC v2",
|
| 120 |
-
train_audio=handle_file("voice.wav"),
|
| 121 |
-
train_model_name="my_voice",
|
| 122 |
-
train_epochs=50, # 50-500
|
| 123 |
-
train_batch=2, # Batch size
|
| 124 |
-
train_sr=40000, # 32000, 40000, or 48000
|
| 125 |
-
beatrice_epochs=30, # Ignored for RVC
|
| 126 |
-
beatrice_batch=8, # Ignored for RVC
|
| 127 |
-
beatrice_resume=False, # Ignored for RVC
|
| 128 |
-
api_name="/train"
|
| 129 |
-
)
|
| 130 |
-
print(result) # (model_path, status_log)
|
| 131 |
-
|
| 132 |
-
# Beatrice v2 training
|
| 133 |
-
result = client.predict(
|
| 134 |
-
trainer="Beatrice v2",
|
| 135 |
-
train_audio=handle_file("voice.wav"),
|
| 136 |
-
train_model_name="my_voice",
|
| 137 |
-
train_epochs=50, # Ignored for Beatrice
|
| 138 |
-
train_batch=2, # Ignored for Beatrice
|
| 139 |
-
train_sr=40000, # Ignored for Beatrice
|
| 140 |
-
beatrice_epochs=30, # 20-50 recommended
|
| 141 |
-
beatrice_batch=8, # Batch size
|
| 142 |
-
beatrice_resume=False, # Resume from checkpoint
|
| 143 |
-
api_name="/train"
|
| 144 |
-
)
|
| 145 |
-
print(result) # (model_path, status_log)
|
| 146 |
-
```
|
| 147 |
-
|
| 148 |
-
### MCP (Model Context Protocol)
|
| 149 |
-
|
| 150 |
-
This Space supports MCP for AI assistants (Claude Desktop, Cursor, VS Code).
|
| 151 |
-
|
| 152 |
-
1. Click **MCP** badge → **Add to MCP tools**
|
| 153 |
-
2. The `convert` and `train` tools become available
|
| 154 |
-
|
| 155 |
-
**MCP Config:**
|
| 156 |
-
```json
|
| 157 |
-
{
|
| 158 |
-
"mcpServers": {
|
| 159 |
-
"rvc": {"url": "https://luminia-rvc-voice-conversion.hf.space/gradio_api/mcp/"}
|
| 160 |
-
}
|
| 161 |
-
}
|
| 162 |
-
```
|
| 163 |
-
|
| 164 |
-
---
|
| 165 |
-
|
| 166 |
-
## CLI Usage
|
| 167 |
-
|
| 168 |
-
### Inference
|
| 169 |
-
```bash
|
| 170 |
-
# RVC v2
|
| 171 |
-
python app.py infer -i voice.wav -m model.pth -o output.wav
|
| 172 |
-
|
| 173 |
-
# Beatrice v2 (auto-detected from .pt.gz extension)
|
| 174 |
-
python app.py infer -i voice.wav -m beatrice_model.pt.gz -o output.wav
|
| 175 |
-
|
| 176 |
-
# With pitch shift
|
| 177 |
-
python app.py infer -i voice.wav -m model.pth -p 2 -o output.wav
|
| 178 |
-
|
| 179 |
-
# Beatrice with speaker/formant options
|
| 180 |
-
python app.py infer -i voice.wav -m beatrice.pt.gz --speaker 0 --formant-shift 1.0 -o output.wav
|
| 181 |
-
```
|
| 182 |
-
|
| 183 |
-
### Training
|
| 184 |
-
```bash
|
| 185 |
-
# RVC v2 training
|
| 186 |
-
python app.py train -a voice.mp3 -o ./my_model --epochs 100
|
| 187 |
-
|
| 188 |
-
# Beatrice v2 training
|
| 189 |
-
python app.py train-beatrice -a voice.mp3 -o ./beatrice_model --epochs 30
|
| 190 |
-
|
| 191 |
-
# Beatrice resume training
|
| 192 |
-
python app.py train-beatrice -a voice.mp3 -o ./beatrice_model --epochs 30 --resume
|
| 193 |
-
```
|
| 194 |
-
|
| 195 |
-
---
|
| 196 |
-
|
| 197 |
-
- Local real-time model usage: https://huggingface.co/wok000/vcclient000/tree/main
|
| 198 |
-
|
| 199 |
-
## Credits
|
| 200 |
-
|
| 201 |
-
Based on [RVC-Project](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI)-[Mangio-UI-Fork](https://github.com/Mangio621/Mangio-RVC-Fork), [Applio](https://github.com/IAHispano/Applio) data processing, and [Beatrice v2](https://huggingface.co/fierce-cats/beatrice-trainer)
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Internal Engine
|
| 3 |
+
emoji: ⚙️
|
| 4 |
+
colorFrom: gray
|
| 5 |
+
colorTo: gray
|
| 6 |
sdk: gradio
|
| 7 |
python_version: "3.10"
|
| 8 |
sdk_version: 6.3.0
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
license: mit
|
| 12 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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