|
|
--- |
|
|
license: cc-by-nc-sa-4.0 |
|
|
language: |
|
|
- en |
|
|
- zh |
|
|
- ar |
|
|
tags: |
|
|
- text-to-speech |
|
|
library_tag: spark-tts |
|
|
base_model: |
|
|
- SparkAudio/Spark-TTS-0.5B |
|
|
pipeline_tag: text-to-speech |
|
|
datasets: |
|
|
- MBZUAI/ArVoice |
|
|
- mozilla-foundation/common_voice_17_0 |
|
|
--- |
|
|
|
|
|
|
|
|
## Spark-TTS π₯ |
|
|
|
|
|
### ππ» [Spark-TTS Demos](https://sparkaudio.github.io/spark-tts/) ππ» |
|
|
|
|
|
### ππ» [Github Repo](https://github.com/SparkAudio/Spark-TTS) ππ» |
|
|
|
|
|
### ππ» [Paper](https://arxiv.org/pdf/2503.01710) ππ» |
|
|
|
|
|
### Overview |
|
|
|
|
|
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. |
|
|
|
|
|
--- |
|
|
|
|
|
<table align="center"> |
|
|
<tr> |
|
|
<td align="center"><b>Inference Overview of Voice Cloning</b><br><img src="src/figures/infer_voice_cloning.png" width="80%" /></td> |
|
|
</tr> |
|
|
<tr> |
|
|
<td align="center"><b>Inference Overview of Controlled Generation</b><br><img src="src/figures/infer_control.png" width="80%" /></td> |
|
|
</tr> |
|
|
</table> |
|
|
|
|
|
|
|
|
## Install |
|
|
**Clone and Install** |
|
|
|
|
|
- Clone the repo |
|
|
``` sh |
|
|
git clone https://github.com/SparkAudio/Spark-TTS.git |
|
|
cd Spark-TTS |
|
|
``` |
|
|
|
|
|
- Install Conda: please see https://docs.conda.io/en/latest/miniconda.html |
|
|
- Create Conda env: |
|
|
|
|
|
``` sh |
|
|
conda create -n sparktts -y python=3.12 |
|
|
conda activate sparktts |
|
|
pip install -r requirements.txt |
|
|
``` |
|
|
|
|
|
**Model Download** |
|
|
|
|
|
Download via python: |
|
|
```python |
|
|
from huggingface_hub import snapshot_download |
|
|
|
|
|
snapshot_download("MrEzzat/Spark_TTS_Arabic", local_dir="pretrained_models/Spark-TTS-0.5B") |
|
|
``` |
|
|
|
|
|
Download via git clone: |
|
|
```sh |
|
|
mkdir -p pretrained_models |
|
|
|
|
|
# Make sure you have git-lfs installed (https://git-lfs.com) |
|
|
git lfs install |
|
|
|
|
|
git clone https://huggingface.co/MrEzzat/Spark_TTS_Arabic |
|
|
``` |
|
|
|
|
|
**Basic Usage** |
|
|
|
|
|
You can simply run the demo with the following commands: |
|
|
``` sh |
|
|
cd example |
|
|
bash infer.sh |
|
|
``` |
|
|
|
|
|
Alternatively, you can directly execute the following command in the command line to perform inferenceοΌ |
|
|
|
|
|
``` sh |
|
|
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" |
|
|
``` |
|
|
|
|
|
**UI Usage** |
|
|
|
|
|
You can start the UI interface by running `python webui.py`, 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** | |
|
|
|:-------------------:|:-------------------:| |
|
|
|  |  | |
|
|
|
|
|
## Citation |
|
|
|
|
|
``` |
|
|
@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}, |
|
|
} |
|
|
``` |