Instructions to use airguoqiang/TCG-VoxCPM2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- VoxCPM
How to use airguoqiang/TCG-VoxCPM2 with VoxCPM:
import soundfile as sf from voxcpm import VoxCPM model = VoxCPM.from_pretrained("airguoqiang/TCG-VoxCPM2") 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
TCG-VoxCPM2
Text-to-speech with non-verbal vocalization tags, in Mandarin and English.
Code: GitHub · Demo: audio samples · Paper: arXiv
TCG-VoxCPM2 is the model of the paper Where More Than Which: Distilling Tag-Contrastive Guidance for Non-Verbal
Vocalizations. Write tags such as [laugh], [sigh] or [cough] in the text, and the model voices them where they
stand. It is fine-tuned from the
NVVSpeech Challenge Track-2 baseline
(VoxCPM2, 2B).
Usage
pip install voxcpm==2.0.3 soundfile
hf download airguoqiang/TCG-VoxCPM2 infer.py nv_tags.py --local-dir .
python infer.py --text "Sorry, [cough] it's the dust in here. Where were we?" --output cough.wav
Add --ref_audio ref.wav, a short clip of the target voice that you provide, to clone a voice. See python infer.py --help for all options.
Supported tags
[breath] [sniff] [laugh] [cry] [cough] [throat clearing] [sneeze] [sigh] [gasp] [snore] [yawn]
[hum] [moan] [hiss] [lipsmack] [burp]
Citation
If you find this work useful, please cite:
@misc{hu2026where,
title = {Where More Than Which: Distilling Tag-Contrastive Guidance for Non-Verbal Vocalizations},
author = {Hu, Guoqiang and Peng, Yizhou and Liu, Changsong and Chao, Yi-Wen and Wang, Yuxi and Wu, Yihao and
Wu, Mengjun and Zhang, Qianen and Lyu, Chenyang and Chng, Eng Siong},
year = {2026},
eprint = {2611.35660},
archivePrefix = {arXiv},
primaryClass = {eess.AS},
url = {https://arxiv.org/abs/2611.35660}
}
License
Released under the NTUITIVE license for non-commercial use only. For a commercial license, contact guoqiang002@e.ntu.edu.sg. The upstream VoxCPM2 and Track-2 baseline weights are Apache-2.0; see NOTICE and LICENSE-APACHE-2.0.
- Downloads last month
- 31
Model tree for airguoqiang/TCG-VoxCPM2
Base model
openbmb/VoxCPM2