Indic Parler-TTS is a multilingual text-to-speech model developed through a collaboration between the AI4Bharat team at IIT Madras and HuggingFace's audio team. It extends the Parler-TTS Mini architecture to support 21 Indian languages alongside English, fine-tuned on a comprehensive 1,806-hour multilingual dataset covering Indic and English speech.
The model adopts a three-component encoder-decoder architecture:
This repository documents the complete adaptation of Indic Parler-TTS for deployment on Ascend 910 NPU accelerators. The adaptation leverages torch_npu for direct device mapping without any model code modifications, as all operators involved are native PyTorch operations fully compatible with the Ascend backend.
The following environment was used for adaptation and validation:
| Category | Component | Version / Spec |
|---|---|---|
| Hardware | NPU | Ascend 910 (NPU 7, Chip 14, 64GB HBM) |
| Hardware | Architecture | Ascend910_9362 |
| Driver | CANN | 8.5.1 |
| Monitor | npu-smi | 25.5.5 |
| Language | Python | 3.11.14 |
| Framework | PyTorch | 2.9.0 |
| Backend | torch_npu | 2.9.0.post1 |
| Transformers | HuggingFace | 4.46.1 |
| TTS Library | parler-tts | 0.2.3 |
| Audio I/O | soundfile | 0.13+ |
| HTTP Server | FastAPI / uvicorn | 0.100+ / 0.23+ |
| Audio Codec | descript-audio-codec | 1.0.0 |
Single-turn inference from the command line:
python inference.py --text "Hello, this is a test of the Indic Parler-TTS model." --output test.wavCustom voice characteristics can be specified through the description parameter:
python inference.py \
--text "Welcome to the world of multilingual speech synthesis." \
--description "A calm and soothing female voice reading at a relaxed pace." \
--output welcome.wavLaunch the API server:
python inference.py --serve --port 8001The server exposes three RESTful endpoints:
Example API call:
curl -X POST http://localhost:8001/tts \
-H "Content-Type: application/json" \
-d '{"text":"Hello from Indic Parler-TTS","description":"A clear voice","max_length":500}'After starting the service, run these verification commands:
# Verify service health
curl -s http://localhost:8001/health | python3 -m json.tool
# Quick TTS test with Hindi
curl -s -X POST http://localhost:8001/tts \
-H "Content-Type: application/json" \
-d '{"text":"नमस्ते","max_length":200}' | python3 -c \
"import json,sys; d=json.load(sys.stdin); print(f'OK: duration={d[\"duration_sec\"]}s, infer_time={d[\"inference_time_sec\"]}s')"
# Verify language support
curl -s http://localhost:8001/languages | python3 -c \
"import json,sys; d=json.load(sys.stdin); print(f'Languages: {len(d[\"supported_languages\"])} supported')"Expected: All three commands return HTTP 200 with valid JSON responses. The TTS endpoint returns a base64-encoded WAV audio payload.
Benchmark results measured on single Ascend 910 NPU:
| Metric | Value |
|---|---|
| Total parameters | 937,803,241 (~937M) |
| Model size on disk | 3.5 GB (safetensors) |
| NPU memory (idle) | ~4,148 MB |
| NPU memory (peak during inference) | ~5,043 MB |
| Power consumption (idle) | ~163 W |
| Power consumption (peak inference) | ~190 W |
| Audio sample rate | 44,100 Hz |
| Typical inference (500 frames) | ~12 seconds |
| Typical inference (800 frames) | ~20 seconds |
| AICore utilization | Sustained high during generation |
The autoregressive nature of the decoder means longer audio generation requires proportionally more inference time. The 24-layer decoder with 9-codebook prediction is the primary computational bottleneck.
Inference accuracy on Ascend NPU versus CPU baseline:
The model uses only float32 precision throughout, avoiding any quantization-related accuracy degradation. The DAC audio codec operates lossily by design, but this is inherent to the model architecture and not related to the NPU adaptation.
max_length parameter determines the number of audio frames generated; each frame is equivalent to 512 PCM samples at 44100 Hz