Browse by type
<h1>
Spark-TTS
</h1>
Official PyTorch code for inference of
<b><em>Spark-TTS: An Efficient LLM-Based Text-to-Speech Model with Single-Stream Decoupled Speech Tokens</em></b>
<img src="https://github.com/SparkAudio/Spark-TTS/raw/main/src/logo/SparkTTS.jpg" alt="Spark-TTS Logo" style="width: 200px; height: 200px;">
<img src="https://github.com/SparkAudio/Spark-TTS/raw/main/src/logo/HKUST.jpg" alt="Institution 1" style="width: 200px; height: 60px;">
<img src="https://github.com/SparkAudio/Spark-TTS/raw/main/src/logo/mobvoi.jpg" alt="Institution 2" style="width: 200px; height: 60px;">
<img src="https://github.com/SparkAudio/Spark-TTS/raw/main/src/logo/SJU.jpg" alt="Institution 3" style="width: 200px; height: 60px;">
<img src="https://github.com/SparkAudio/Spark-TTS/raw/main/src/logo/NTU.jpg" alt="Institution 4" style="width: 200px; height: 60px;">
<img src="https://github.com/SparkAudio/Spark-TTS/raw/main/src/logo/NPU.jpg" alt="Institution 5" style="width: 200px; height: 60px;">
<img src="https://github.com/SparkAudio/Spark-TTS/raw/main/src/logo/SparkAudio2.jpg" alt="Institution 6" style="width: 200px; height: 60px;">
<a href="https://arxiv.org/pdf/2503.01710"><img src="https://img.shields.io/badge/Paper-ArXiv-red" alt="paper"></a>
<a href="https://sparkaudio.github.io/spark-tts/"><img src="https://img.shields.io/badge/Demo-Page-lightgrey" alt="version"></a>
<a href="https://huggingface.co/SparkAudio/Spark-TTS-0.5B"><img src="https://img.shields.io/badge/Hugging%20Face-Model%20Page-yellow" alt="Hugging Face"></a>
<a href="https://github.com/SparkAudio/Spark-TTS"><img src="https://img.shields.io/badge/Platform-linux-lightgrey" alt="version"></a>
<a href="https://github.com/SparkAudio/Spark-TTS"><img src="https://img.shields.io/badge/Python-3.12+-orange" alt="version"></a>
<a href="https://github.com/SparkAudio/Spark-TTS"><img src="https://img.shields.io/badge/PyTorch-2.5+-brightgreen" alt="python"></a>
<a href="https://github.com/SparkAudio/Spark-TTS"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="mit"></a>
Spark-TTS is an advanced text-to-speech system that uses the power of large language models (LLM) for highly accurate and natural-sounding voice synthesis. It is designed to be efficient, flexible, and powerful for both research and production use.
Inference Overview of Voice Cloning
![]() |
Inference Overview of Controlled Generation
![]() |
[2025-03-04] Our paper on this project has been published! You can read it here: Spark-TTS.
[2025-03-12] Nvidia Triton Inference Serving is now supported. See the Runtime section below for more details.
Clone and Install
Here are instructions for installing on Linux. If you're on Windows, please refer to the Windows Installation Guide.
(Thanks to @AcTePuKc for the detailed Windows instructions!)
git clone https://github.com/SparkAudio/Spark-TTS.git
cd Spark-TTS
conda create -n sparktts -y python=3.12
conda activate sparktts
pip install -r requirements.txt
# If you are in mainland China, you can set the mirror as follows:
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com
Model Download
Download via python:
from huggingface_hub import snapshot_download
snapshot_download("SparkAudio/Spark-TTS-0.5B", local_dir="pretrained_models/Spark-TTS-0.5B")
Download via git clone:
mkdir -p pretrained_models
# Make sure you have git-lfs installed (https://git-lfs.com)
git lfs install
git clone https://huggingface.co/SparkAudio/Spark-TTS-0.5B pretrained_models/Spark-TTS-0.5B
Basic Usage
You can simply run the demo with the following commands:
cd example
bash infer.sh
Alternatively, you can directly execute the following command in the command line to perform inference:
python -m cli.inference \
--text "text to synthesis." \
--device 0 \
--save_dir "path/to/save/audio" \
--model_dir pretrained_models/Spark-TTS-0.5B \
--prompt_text "transcript of the prompt audio" \
--prompt_speech_path "path/to/prompt_audio"
Web UI Usage
You can start the UI interface by running python webui.py --device 0, which allows you to perform Voice Cloning and Voice Creation. Voice Cloning supports uploading reference audio or directly recording the audio.
| Voice Cloning | Voice Creation |
|---|---|
![]() |
![]() |
Optional Methods
For additional CLI and Web UI methods, including alternative implementations and extended functionalities, you can refer to:
Nvidia Triton Inference Serving
We now provide a reference for deploying Spark-TTS with Nvidia Triton and TensorRT-LLM. The table below presents benchmark results on a single L20 GPU, using 26 different prompt_audio/target_text pairs (totalling 169 seconds of audio):
| Model | Note | Concurrency | Avg Latency | RTF |
|---|---|---|---|---|
| Spark-TTS-0.5B | Code Commit | 1 | 876.24 ms | 0.1362 |
| Spark-TTS-0.5B | Code Commit | 2 | 920.97 ms | 0.0737 |
| Spark-TTS-0.5B | Code Commit | 4 | 1611.51 ms | 0.0704 |
Please see the detailed instructions in runtime/triton_trtllm/README.md for more information.
Here are some demos generated by Spark-TTS using zero-shot voice cloning. For more demos, visit our demo page.
| **Donald Trump** | **Zhongli (Genshin Impact)** |
| [Donald Trump](https://github.com/user-attachments/assets/fb225780-d9fe-44b2-9b2e-54390cb3d8fd) | [Zhongli](https://github.com/user-attachments/assets/80eeb9c7-0443-4758-a1ce-55ac59e64bd6) |
| **陈鲁豫 Chen Luyu** | **杨澜 Yang Lan** |
| [陈鲁豫Chen_Luyu.webm](https://github.com/user-attachments/assets/5c6585ae-830d-47b1-992d-ee3691f48cf4) | [Yang_Lan.webm](https://github.com/user-attachments/assets/2fb3d00c-abc3-410e-932f-46ba204fb1d7) |
| **余承东 Richard Yu** | **马云 Jack Ma** |
| [Yu_Chengdong.webm](https://github.com/user-attachments/assets/78feca02-84bb-4d3a-a770-0cfd02f1a8da) | [Ma_Yun.webm](https://github.com/user-attachments/assets/2d54e2eb-cec4-4c2f-8c84-8fe587da321b) |
| **刘德华 Andy Lau** | **徐志胜 Xu Zhisheng** |
| [Liu_Dehua.webm](https://github.com/user-attachments/assets/195b5e97-1fee-4955-b954-6d10fa04f1d7) | [Xu_Zhisheng.webm](https://github.com/user-attachments/assets/dd812af9-76bd-4e26-9988-9cdb9ccbb87b) |
| **哪吒 Nezha** | **李靖 Li Jing** |
| [Ne_Zha.webm](https://github.com/user-attachments/assets/8c608037-a17a-46d4-8588-4db34b49ed1d) | [Li_Jing.webm](https://github.com/user-attachments/assets/aa8ba091-097c-4156-b4e3-6445da5ea101) |
@misc{wang2025sparktts,
title={Spark-TTS: An Efficient LLM-Based Text-to-Speech Model with Single-Stream Decoupled Speech Tokens},
author={Xinsheng Wang and Mingqi Jiang and Ziyang Ma and Ziyu Zhang and Songxiang Liu and Linqin Li and Zheng Liang and Qixi Zheng and Rui Wang and Xiaoqin Feng and Weizhen Bian and Zhen Ye and Sitong Cheng and Ruibin Yuan and Zhixian Zhao and Xinfa Zhu and Jiahao Pan and Liumeng Xue and Pengcheng Zhu and Yunlin Chen and Zhifei Li and Xie Chen and Lei Xie and Yike Guo and Wei Xue},
year={2025},
eprint={2503.01710},
archivePrefix={arXiv},
primaryClass={cs.SD},
url={https://arxiv.org/abs/2503.01710},
}
This project provides a zero-shot voice cloning TTS model intended for academic research, educational purposes, and legitimate applications, such as personalized speech synthesis, assistive technologies, and linguistic research.
Please note:
Do not use this model for unauthorized voice cloning, impersonation, fraud, scams, deepfakes, or any illegal activities.
Ensure compliance with local laws and regulations when using this model and uphold ethical standards.
The developers assume no liability for any misuse of this model.
We advocate for the responsible development and use of AI and encourage the community to uphold safety and ethical principles in AI research and applications. If you have any concerns regarding ethics or misuse, please contact us.
$ claude mcp add Spark-TTS \
-- python -m otcore.mcp_server <graph>