update readme for modelscope download

This commit is contained in:
Labmem-Zhouyx
2026-04-08 11:29:19 +08:00
parent 9adfaf6996
commit df38f0a167
3 changed files with 81 additions and 10 deletions
+23 -1
View File
@@ -103,7 +103,7 @@ from voxcpm import VoxCPM
import soundfile as sf
model = VoxCPM.from_pretrained(
"openbmb/VoxCPM2"
"openbmb/VoxCPM2",
load_denoiser=False,
)
@@ -116,6 +116,28 @@ sf.write("demo.wav", wav, model.tts_model.sample_rate)
print("saved: demo.wav")
```
If you prefer downloading from ModelScope first, you can use:
```bash
pip install modelscope
```
```python
from modelscope.hub.snapshot_download import snapshot_download
from voxcpm import VoxCPM
import soundfile as sf
local_model_dir = snapshot_download("OpenBMB/VoxCPM2")
model = VoxCPM.from_pretrained(local_model_dir, load_denoiser=False)
wav = model.generate(
text="VoxCPM2 is the current recommended release for realistic multilingual speech synthesis.",
cfg_value=2.0,
inference_timesteps=10,
)
sf.write("demo.wav", wav, model.tts_model.sample_rate)
```
#### 🎨 Voice Design
Create a voice from a natural-language description — no reference audio needed. **Format:** put the description in parentheses at the start of `text`(e.g. `"(your voice description)The text to synthesize."`):