spark-tts
commited on
Commit
·
020c49b
1
Parent(s):
7aa1435
add readme
Browse files- README.md +64 -0
- example/infer.sh +1 -1
- example/results/20250225113521.wav +0 -0
- requirements.txt +12 -0
- src/logo.webp +0 -0
README.md
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div align="center">
|
2 |
+
<h1>
|
3 |
+
Spark-TTS
|
4 |
+
</h1>
|
5 |
+
<p>
|
6 |
+
Official PyTorch code for inference of <br>
|
7 |
+
<b><em>Spark-TTS: An Efficient LLM-Based Text-to-Speech Model with Single-Stream Decoupled Speech Tokens</em></b>
|
8 |
+
</p>
|
9 |
+
<p>
|
10 |
+
<img src="src/logo.png" alt="Spark-TTS Logo" style="width: 200px; height: 200px;">
|
11 |
+
</p>
|
12 |
+
<p>
|
13 |
+
</p>
|
14 |
+
<a href="https://spark-tts.github.io/"><img src="https://img.shields.io/badge/Demo-Page-lightgrey" alt="version"></a>
|
15 |
+
<a href="https://github.com/SparkAudio/Spark-TTS"><img src="https://img.shields.io/badge/Platform-linux-lightgrey" alt="version"></a>
|
16 |
+
<a href="https://github.com/SparkAudio/Spark-TTS"><img src="https://img.shields.io/badge/Python-3.12.2-orange" alt="version"></a>
|
17 |
+
<a href="https://github.com/SparkAudio/Spark-TTS"><img src="https://img.shields.io/badge/PyTorch-2.5.1-brightgreen" alt="python"></a>
|
18 |
+
<a href="https://github.com/SparkAudio/Spark-TTS"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="mit"></a>
|
19 |
+
</div>
|
20 |
+
|
21 |
+
|
22 |
+
## Spark-TTS 🔥
|
23 |
+
|
24 |
+
### Overview
|
25 |
+
|
26 |
+
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.
|
27 |
+
|
28 |
+
### Key Features
|
29 |
+
|
30 |
+
- **Simplicity and Efficiency**: Built entirely on Qwen2.5, Spark-TTS eliminates the need for additional generation models like flow matching. Instead of relying on separate models to generate acoustic features, it directly reconstructs audio from the code predicted by the LLM. This approach streamlines the process, improving efficiency and reducing complexity.
|
31 |
+
- **High-Quality Voice Cloning**: Supports zero-shot voice cloning, which means it can replicate a speaker's voice even without specific training data for that voice. This is ideal for cross-lingual and code-switching scenarios, allowing for seamless transitions between languages and voices without requiring separate training for each one.
|
32 |
+
- **Bilingual Support**: Supports both Chinese and English, and is capable of zero-shot voice cloning for cross-lingual and code-switching scenarios, enabling the model to synthesize speech in multiple languages with high naturalness and accuracy.
|
33 |
+
|
34 |
+
## Install
|
35 |
+
**Clone and Install**
|
36 |
+
|
37 |
+
- Clone the repo
|
38 |
+
``` sh
|
39 |
+
git clone https://github.com/SparkAudio/Spark-TTS.git
|
40 |
+
cd Spark-TTS
|
41 |
+
```
|
42 |
+
|
43 |
+
- Install Conda: please see https://docs.conda.io/en/latest/miniconda.html
|
44 |
+
- Create Conda env:
|
45 |
+
|
46 |
+
``` sh
|
47 |
+
conda create -n sparktts -y python=3.12
|
48 |
+
conda activate sparktts
|
49 |
+
pip install -r requirements.txt
|
50 |
+
# if you are in mainland of China, you can set the mirror as follows:
|
51 |
+
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com
|
52 |
+
```
|
53 |
+
|
54 |
+
**Model Download**
|
55 |
+
|
56 |
+
TBD
|
57 |
+
|
58 |
+
**Basic Usage**
|
59 |
+
|
60 |
+
You can simply run the demo with the following commands:
|
61 |
+
``` sh
|
62 |
+
cd example
|
63 |
+
bash infer.sh
|
64 |
+
```
|
example/infer.sh
CHANGED
@@ -26,7 +26,7 @@ root_dir=$(dirname "$script_dir")
|
|
26 |
device=0
|
27 |
save_dir='example/results'
|
28 |
model_dir="pretrained_models/Spark-TTS-0.5B"
|
29 |
-
text="
|
30 |
prompt_text="吃燕窝就选燕之屋,本节目由26年专注高品质燕窝的燕之屋冠名播出。豆奶牛奶换着喝,营养更均衡,本节目由豆本豆豆奶特约播出。"
|
31 |
prompt_speech_path="example/prompt_audio.wav"
|
32 |
|
|
|
26 |
device=0
|
27 |
save_dir='example/results'
|
28 |
model_dir="pretrained_models/Spark-TTS-0.5B"
|
29 |
+
text="革新体验,自然呈现,开启语音合成新纪元。此模型由智能语音开源社区 Spark Audio 精心打造。"
|
30 |
prompt_text="吃燕窝就选燕之屋,本节目由26年专注高品质燕窝的燕之屋冠名播出。豆奶牛奶换着喝,营养更均衡,本节目由豆本豆豆奶特约播出。"
|
31 |
prompt_speech_path="example/prompt_audio.wav"
|
32 |
|
example/results/20250225113521.wav
ADDED
Binary file (237 kB). View file
|
|
requirements.txt
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
einops==0.8.1
|
2 |
+
einx==0.3.0
|
3 |
+
numpy==2.2.3
|
4 |
+
omegaconf==2.3.0
|
5 |
+
packaging==24.2
|
6 |
+
safetensors==0.5.2
|
7 |
+
soundfile==0.12.1
|
8 |
+
soxr==0.5.0.post1
|
9 |
+
torch==2.5.1
|
10 |
+
torchaudio==2.5.1
|
11 |
+
tqdm==4.66.5
|
12 |
+
transformers==4.46.2
|
src/logo.webp
ADDED
![]() |