Original model: ResembleAI/chatterbox – 0.5B multilingual TTS (MIT).
This repository is an Ascend NPU (910B) adaptation that runs Chatterbox on npu:0 via torch_npu.
assets/npu_device_call.png – torch.npu.is_available()=True, device count & name, model param & I/O tensor devices on npu:0assets/model_result.png – VoiceEncoder CPU↔NPU consistency (max diff, cosine) + full TTS wav finite check, latency/RTFassets/agent_workflow.png – full workflow logpip install -r requirements.txt
# 1) Fast VoiceEncoder NPU demo (no 2GB T3 download, proves npu:0)
python inference.py --mode ve --device npu:0
# 2) Full TTS (requires ve.safetensors + t3_cfg.safetensors + s3gen.safetensors)
python inference.py --mode full --device npu:0 --text "Hello from Ascend NPU" --output /tmp/out.wav
# Force CPU for comparison
python inference.py --mode ve --device cpuWeights are not bundled. inference.py loads from HF cache / hf-mirror.com via huggingface_hub (uses HF_HUB_ENABLE_HF_TRANSFER=1 for speed). Cached at HF_HOME=/data/adapt-npu-agent/hf.
ve.safetensors (5.6 MB) – VoiceEncodert3_cfg.safetensors (2.1 GB) – T3 LLMs3gen.safetensors (1.05 GB) – S3Gen flow + HiFiGANconds.pt – built-in voice conditionals.to(device) uses torch.device("npu:0"); no CUDA hard-code.torch.npu.synchronize() around timing for accurate latency (distinguishes compile vs stable).torch.inference_mode() for deterministic forward.[INFO] npu device_name: Ascend910
[CPU] model first param device: cpu
[NPU] model first param device: npu:0
[CONSISTENCY] max_diff: 0.0000xx, cosine: 0.9999model_result log (first run includes compile, second run stable).MIT (same as original). Watermark via perth retained.
