A lightweight text-to-speech (TTS) model adapted for Huawei Ascend NPU (Ascend 910). Based on Kyutai's Pocket TTS (without voice cloning variant).
pip install pocket-tts safetensors scipy numpy beartypepip install modelscope
modelscope download --model AI-ModelScope/pocket-tts-without-voice-cloningfrom inference import load_model_on_npu, create_voice_state, run_inference
import scipy.io.wavfile
# Load model on NPU
model = load_model_on_npu()
# Create voice state
voice_state = create_voice_state(model, seed=42)
# Generate speech
audio, stats = run_inference(model, voice_state, "Hello world!", seed=42)
# Save audio
scipy.io.wavfile.write("output.wav", model.sample_rate, audio.cpu().numpy())
print(f"Generated {stats['duration_s']:.1f}s audio in {stats['elapsed_s']:.2f}s ({stats['rtf']:.1f}x RTF)")Or use the command line:
python inference.py --text "Hello world, this is a test." --output output.wav
python inference.py --text "Hello world." --compare # accuracy validation
python inference.py --benchmark # performance testAccuracy is validated by comparing deterministic model components (encoder, decoder, backbone transformer) between NPU and CPU. TTS generation is stochastic due to random noise sampling, so direct audio comparison is not meaningful.
| Component | Max Relative Error | Status |
|---|---|---|
| Mimi Encoder | 0.0000% | ✅ Pass |
| Mimi Decoder | 0.0270% | ✅ Pass |
| FlowLM Backbone | 0.0150% | ✅ Pass |
| Overall | 0.0270% | ✅ Pass (< 1%) |
Benchmarked on Huawei Ascend 910 (single NPU):
| Metric | Value |
|---|---|
| Average RTF | 4.38x |
| Total RTF | 4.70x |
| Model Parameters | 109.5 M |
| Sample Rate | 24 kHz |
| Precision | FP32 |
Compared to CPU baseline (~1.07x RTF), the NPU delivers approximately 4.4x speedup.
Pocket TTS consists of two main components:
FlowLM (Flow Language Model): A transformer-based flow model that generates audio latents from text input. Features:
Mimi (Audio Codec): A SEANet-based encoder/decoder that converts between audio and latent space. Features:
pocket-tts-npu/
├── inference.py # Main NPU inference script
├── README.md # This file
├── accuracy_report.json # Accuracy validation results
├── benchmark_report.json # Performance benchmark results
└── output_npu.wav # Sample generated audioThis model is released under the CC-BY-4.0 license.
@article{orsini2025pocket,
title={Pocket TTS: Lightweight Text-to-Speech},
author={Orsini, Manu and Rouard, Simon and De Marmiesse, Gabriel and Volhejn, Václav and Zeghidour, Neil and Défossez, Alexandre},
journal={arXiv preprint arXiv:2509.06926},
year={2025}
}Use of this model must comply with all applicable laws and regulations. Prohibited uses include voice impersonation or cloning without explicit consent, misinformation, and generation of unlawful or harmful content.