Instructions to use jing96963/yousheng with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- VoxCPM
How to use jing96963/yousheng with VoxCPM:
import soundfile as sf from voxcpm import VoxCPM model = VoxCPM.from_pretrained("jing96963/yousheng") wav = model.generate( text="VoxCPM is an innovative end-to-end TTS model from ModelBest, designed to generate highly expressive speech.", prompt_wav_path=None, # optional: path to a prompt speech for voice cloning prompt_text=None, # optional: reference text cfg_value=2.0, # LM guidance on LocDiT, higher for better adherence to the prompt, but maybe worse inference_timesteps=10, # LocDiT inference timesteps, higher for better result, lower for fast speed normalize=True, # enable external TN tool denoise=True, # enable external Denoise tool retry_badcase=True, # enable retrying mode for some bad cases (unstoppable) retry_badcase_max_times=3, # maximum retrying times retry_badcase_ratio_threshold=6.0, # maximum length restriction for bad case detection (simple but effective), it could be adjusted for slow pace speech ) sf.write("output.wav", wav, 16000) print("saved: output.wav") - Notebooks
- Google Colab
- Kaggle
yousheng
Fine-tuned VoxCPM2 checkpoint (full finetune, step 6000).
推理
```bash
git clone https://github.com/OpenBMB/VoxCPM.git
cd VoxCPM && pip install -e .
huggingface-cli download jing96963/yousheng --local-dir ./ckpt
python scripts/test_voxcpm_ft_infer.py
--ckpt_dir ./ckpt
--text "你好,这是 VoxCPM 的微调测试。"
--output out.wav
```
或 Python 中:
```python from voxcpm import VoxCPM import soundfile as sf
model = VoxCPM.from_pretrained("jing96963/yousheng", load_denoiser=False, optimize=True) wav = model.generate( text="你好,这是 VoxCPM 2 的推理测试。", cfg_value=2.0, inference_timesteps=10, max_len=600, normalize=False, denoise=False, ) sf.write("out.wav", wav, model.tts_model.sample_rate) # sr=48000 ```
注意
- dtype 在 config.json 里设为 bfloat16,与训练精度一致
- 输出采样率 48000 Hz
- 不包含 optimizer.pth / scheduler.pth / training_state.json(推理用不到)
- Downloads last month
- 4