--- title: Vietnamese TTS - SparkTTS emoji: 🎙️ colorFrom: blue colorTo: green sdk: gradio sdk_version: 5.9.1 app_file: app.py pinned: false license: mit --- # Vietnamese TTS Demo A Vietnamese text-to-speech demo powered by **SparkTTS** fine-tuned on Vietnamese speech data, using the [MiraTTS](https://github.com/ysharma3501/MiraTTS) inference pipeline. ## How it works 1. Upload a short reference audio clip (3–10 seconds) to clone the voice 2. Enter Vietnamese text 3. Click **Tổng hợp giọng nói** to generate speech The model uses a BiCodec audio tokenizer to encode the reference voice, then an LLM generates speech tokens conditioned on the text, and a neural decoder + super-resolution upsampler produces 48kHz audio output. ## Connecting your private model In your Space settings, add these secrets/variables: | Key | Value | |-----|-------| | `HF_TOKEN` | A HuggingFace token with read access to the private model repo | | `MODEL_ID` | (optional) Override model repo, default: `sleeper371/sparktts` | ## Architecture - **LLM backbone**: SparkTTS-0.5B (LLaMA-based) fine-tuned on Vietnamese - **Audio codec**: BiCodec (ONNX) from [FastBiCodec](https://github.com/ysharma3501/FastBiCodec) - **Super-resolution**: [FlashSR](https://github.com/ysharma3501/FlashSR) → 48kHz output - **Inference**: `transformers` (ZeroGPU-compatible, no lmdeploy)