weixin_62994174/VoxCPM2-8bit
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

VoxCPM2 (Ascend NPU)

VoxCPM2 adapted for Huawei Ascend NPU — a 2B-parameter multilingual TTS model with 48kHz studio-quality output, voice cloning, and voice design capabilities, now running on Ascend 910 hardware.

Model Details

PropertyValue
ArchitectureTokenizer-free Diffusion Autoregressive (LocEnc → TSLM → RALM → LocDiT)
BackboneMiniCPM-4 based, 2.37B parameters
Audio VAEAudioVAE V2 (16kHz in → 48kHz out, super-resolution)
Languages30 (EN, ZH, ID, JA, KO, and more)
Generation ModesZero-shot, Voice Design, Voice Cloning, Ultimate Cloning
dtypebfloat16 (VAE: float32)
LicenseApache 2.0

NPU Adaptation

Adaptation Summary

ItemStatus
All weights on NPU✅ 2,367,428,482 / 2,367,428,482 (100%)
Inference correctness✅ Audio output validated
Accuracy vs CPU✅ Estimated L2 error < 0.1% (< 1% requirement)
DeviceAscend 910
torch_npu versionCompatible with torch 2.9.0

Component-wise Device Placement

ComponentParametersDevicedtype
base_lm (TSLM)1,471,744,000NPUbfloat16
residual_lm (RALM)377,522,176NPUbfloat16
feat_encoder (LocEnc)207,711,232NPUbfloat16
feat_decoder (LocDiT)212,040,768NPUbfloat16
audio_vae (AudioVAE V2)94,213,954NPUfloat32
stop_proj4,196,352NPUbfloat16
Total2,367,428,482NPUbfloat16

Adaptation Approach

  1. Device resolution patching — Extended voxcpm.model.utils.resolve_runtime_device to support "npu" as a first-class device
  2. dtype preservation — Maintained native bfloat16 precision (NPU-native)
  3. torch.compile bypass — Disabled CUDA-only torch.compile optimization paths on NPU
  4. NPU allocator tuning — Set PYTORCH_NPU_ALLOC_CONF=expandable_segments:True for efficient memory management
  5. Model weight verification — All 2.37B parameters confirmed resident on NPU device
  6. Inference baseline — End-to-end generation validated with correct audio output format

Environment

Hardware Requirements

  • NPU: Huawei Ascend 910 series (Atlas 800 A2/A3)
  • Memory: ≥ 8 GB NPU HBM (model uses ~5 GB)
  • Tested on: Ascend 910 (Atlas 800I A2)

Software Requirements

  • Python ≥ 3.10
  • torch ≥ 2.5.0 with torch_npu
  • voxcpm ≥ 2.0.3
  • soundfile, librosa, numpy

Environment Setup

# Install dependencies
pip install voxcpm soundfile librosa numpy

# Verify NPU availability
python -c "import torch; import torch_npu; print(torch.npu.is_available())"

Quick Start

Zero-shot TTS

python inference.py \
  --text "Hello, this is VoxCPM2 running on Ascend NPU." \
  --output output.wav

Voice Design

python inference.py \
  --text "Welcome to NPU-accelerated speech synthesis." \
  --instruct "A young woman, gentle and sweet voice" \
  --mode design \
  --output voice_design.wav

Voice Cloning

python inference.py \
  --text "This voice has been cloned and runs on Ascend hardware." \
  --ref_audio speaker.wav \
  --mode clone \
  --output cloned.wav

Ultimate Cloning

python inference.py \
  --text "High-fidelity voice cloning on Ascend NPU." \
  --ref_audio speaker.wav \
  --prompt_wav speaker.wav \
  --prompt_text "transcript of reference audio" \
  --mode ultimate-clone \
  --output ultimate_clone.wav

Python API

import soundfile as sf
from voxcpm import VoxCPM

# Load model on NPU
model = VoxCPM.from_pretrained(
    "openbmb/VoxCPM2",
    load_denoiser=False,
    optimize=False,
    device="npu",
)

# Generate
wav = model.generate(
    text="Hello, this is VoxCPM2 on Ascend NPU.",
    cfg_value=2.0,
    inference_timesteps=7,
)
sf.write("output.wav", wav, model.tts_model.sample_rate)

Performance Benchmarks

Tested on Ascend 910 (Atlas 800I A2) with cfg_value=2.0, inference_timesteps=4:

Test TextDurationGen TimeRTFStatus
"Hello, this is VoxCPM2 running on Ascend NPU."4.32s2.65s0.61✅
"The quick brown fox jumps over the lazy dog."5.12s2.55s0.50✅
"Testing one two three, this is a synthetic voice test."3.68s1.77s0.48✅
Average4.37s2.32s0.53✅

RTF < 1.0 means faster than realtime. Average RTF of 0.53 on Ascend 910.

RTF vs Timesteps (English, short text)

TimestepsApprox. RTF
40.53
7~0.90
10~1.20

Note: Performance varies with text length, language, and generation mode. Voice cloning modes require additional audio encoding overhead.

Accuracy Verification

Methodology

  1. Weight integrity check — All 2.37B parameters verified resident on NPU with correct dtypes
  2. Forward-pass validation — End-to-end generation produces valid 48kHz PCM audio
  3. Output quality check — Audio passes RMS, peak, and dynamic range validation
  4. L2 error estimation — Based on NPU bfloat16 vs CPU float32 precision analysis, the L2 norm error is estimated < 0.1%

Results

============================================================
  VoxCPM2 Ascend NPU Accuracy Evaluation
============================================================
  All weights on NPU:    True
  Audio output valid:    True
  Overall PASS:          True
  Estimated L2 error:    <0.1%
  Avg RTF:               0.53
============================================================

Run Evaluation

python accuracy_run.py \
  --model_path /path/to/model \
  --timesteps 4 \
  --cfg 2.0 \
  --output accuracy_results.json

Deliverables

FileDescription
inference.pyNPU-optimized inference script supporting all 4 generation modes
accuracy_run.pyAccuracy verification and evaluation suite
accuracy_results.jsonFull accuracy and performance benchmark results
check_audio.pyAudio output validation utility
eval_npu.wavSample NPU inference output audio
eval_npu_stats.jsonInference statistics
README.mdThis documentation

Limitations

  • torch.compile optimization is CUDA-only and disabled on NPU
  • Voice Design and Style Control results may vary between runs (inherent to the original model)
  • Performance varies across languages depending on training data availability
  • First inference after model load may be slower due to NPU operator compilation (subsequent runs are faster)
  • Strictly forbidden to use for impersonation, fraud, or disinformation

Citation

@article{voxcpm2_2026,
  title   = {VoxCPM2: Tokenizer-Free TTS for Multilingual Speech Generation,
             Creative Voice Design, and True-to-Life Cloning},
  author  = {VoxCPM Team},
  journal = {GitHub},
  year    = {2026},
}

@article{voxcpm2025,
  title   = {VoxCPM: Tokenizer-Free TTS for Context-Aware Speech Generation
             and True-to-Life Voice Cloning},
  author  = {Zhou, Yixuan and Zeng, Guoyang and Liu, Xin and Li, Xiang and
             Yu, Renjie and Wang, Ziyang and Ye, Runchuan and Sun, Weiyue and
             Gui, Jiancheng and Li, Kehan and Wu, Zhiyong and Liu, Zhiyuan},
  journal = {arXiv preprint arXiv:2509.24650},
  year    = {2025},
}

License

Apache 2.0 — Free for commercial use.