Instructions to use paksaz/VoxCPM2-Persian with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- VoxCPM
How to use paksaz/VoxCPM2-Persian with VoxCPM:
import soundfile as sf from voxcpm import VoxCPM model = VoxCPM.from_pretrained("paksaz/VoxCPM2-Persian") 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
VoxCPM2 Persian LoRA — Persian-only
This repository contains a Persian-only LoRA adapter for VoxCPM2. The base model is not included.
This is not a standalone TTS model. The adapter cannot be used on its own: download the Apache-2.0 VoxCPM2 base and load this adapter on top.
Checkpoint
| Folder | Step | Text mode | Training data | val diff / total | Status |
|---|---|---|---|---|---|
stageD_best_500 |
500 | grapheme | clean Neyshekar + ParsVoice, 25,070 clips / 47.22 h | 0.8346 / 0.9073 | recommended |
stageD_best_500 is the clean, audio-first checkpoint:
- full-sentence Persian data, 3–20 s
- trailing silence trimmed
- YODAS/YouTube ASR excluded
- no Pourmand
- 25,070 clips / 47.22 h (37,575 weighted rows)
- selected by audio validation, not loss alone
File checksum: SHA256SUMS.
Model details
- Base: VoxCPM2 (2B parameters), Apache-2.0.
- Adapter: LoRA r=256, alpha=256, LM + DiT + projection layers; ~1.69 GB.
- Training: 1× RTX 3090, bf16, batch 1 × gradient accumulation 16.
- Text side: Persian grapheme; no GE2PE and no phoneme input.
Quick start
pip install "voxcpm" huggingface_hub
from huggingface_hub import snapshot_download
from voxcpm import VoxCPM
repo = snapshot_download("paksaz/VoxCPM2-Persian")
model = VoxCPM.from_pretrained(
"openbmb/VoxCPM2",
lora_weights_path=f"{repo}/stageD_best_500",
)
wav = model.generate(
text="سلام، این یک آزمایش کوتاه است.",
inference_timesteps=10,
cfg_value=2.0,
seed=42,
)
Evaluation
The base vs stageD_best_500 rows use Persian grapheme text only — no GE2PE.
| Model | Persian s1 CER | Persian s2 CER | Persian s3 CER | Mean CER |
|---|---|---|---|---|
| base VoxCPM2 (no LoRA) | 0.214 | 0.177 | 0.533 | 0.308 |
| stageD_best_500 | 0.000 | 0.097 | 0.156 | 0.084 |
Persian sentences:
سلام، این یک آزمایش کوتاه است.امروز هوا بسیار خوب است و میتوانیم برای قدم زدن به پارک برویم.کتاب من روی میز است و خانه ما نزدیک مدرسه است.
Samples: samples/base_0*_fa.wav and samples/stageD_500_0*_fa.wav.
Raw rows: evaluation.json. All generations use cfg 2.0, 10 diffusion steps,
seed 42.
This adapter is Persian-only. It is not intended for English, Arabic, or code-switching.
Training data and licenses
| Dataset | License | Terms / attribution |
|---|---|---|
| Neyshekar (Sana Nazari) | CC0 1.0 | No restrictions. |
| ParsVoice / Persian-Farsi-Speech (Mohammad J. Ranjbar) | CC BY 4.0 | Attribution required; commercial use allowed. |
Adapter license
The adapter weights in this repository are released under CC BY-NC 4.0:
non-commercial use, with attribution. See LICENSE.
- The base model remains Apache-2.0; this repository does not redistribute it.
- The datasets are not redistributed here; their licenses apply to the data.
- If you need commercial use of the adapter, request permission from the author and check both dataset licenses above.
- You may not use the adapter without the VoxCPM2 base model, and you may not remove the attribution notices.
Intended use
- Persian text-to-speech research and personal projects.
- Auditioning/comparing Persian TTS adapters on top of VoxCPM2.
- Optional voice cloning with a short reference clip only with the speaker's consent.
Out of scope: English/Arabic/code-switching, commercial use (the adapter is CC BY-NC 4.0), impersonation, medical/legal/financial advice, or any use that violates the base model or dataset licenses. Do not present cloned speech as a real person's statement.
Limitations
- Persian only. No English, Arabic, or code-switch support.
- No guarantee of zero hallucination.
stageD_best_500was selected by audio validation: one short truncation in 10 held-out sentences, no long tails. - VoxCPM2 is a 2B model. This is not a speed-optimized release.
- ASR metrics can hide pronunciation errors; listen to
samples/before deploying.
Citation / attribution
If you use this adapter, cite VoxCPM2 and the datasets above. At minimum:
VoxCPM2 Persian LoRA (2026). Persian-only LoRA adapter for openbmb/VoxCPM2.
Datasets: Neyshekar (CC0 1.0), ParsVoice (CC BY 4.0).
Model tree for paksaz/VoxCPM2-Persian
Base model
openbmb/VoxCPM2