Update README.md
Browse files
README.md
CHANGED
@@ -1,30 +1,47 @@
|
|
1 |
-
---
|
2 |
-
language:
|
3 |
-
- vi
|
4 |
-
- en
|
5 |
-
pipeline_tag: text-to-speech
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
<!-- # VietTTS: An Open-Source Vietnamese Text to Speech -->
|
9 |
<p align="center">
|
10 |
-
<img src="
|
11 |
<h1 align="center"style="color: white; font-weight: bold; font-family:roboto"><span style="color: white; font-weight: bold; font-family:roboto">VietTTS</span>: An Open-Source Vietnamese Text to Speech</h1>
|
12 |
</p>
|
13 |
<p align="center">
|
14 |
<a href="https://github.com/dangvansam/viet-tts"><img src="https://img.shields.io/github/stars/dangvansam/viet-tts?style=social"></a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
</p>
|
16 |
|
17 |
**VietTTS** is an open-source toolkit providing the community with a powerful Vietnamese TTS model, capable of natural voice synthesis and robust voice cloning. Designed for effective experimentation, **VietTTS** supports research and application in Vietnamese voice technologies.
|
18 |
|
19 |
## ⭐ Key Features
|
20 |
- **TTS**: Text-to-Speech generation with any voice via prompt audio
|
21 |
-
- **
|
22 |
|
23 |
## 🛠️ Installation
|
24 |
|
25 |
-
VietTTS can be installed via
|
26 |
|
27 |
-
### Python Installer
|
28 |
```bash
|
29 |
git clone https://github.com/dangvansam/viet-tts.git
|
30 |
cd viet-tts
|
@@ -52,11 +69,8 @@ docker compose build
|
|
52 |
# Run with docker-compose - will create server at: http://localhost:8298
|
53 |
docker compose up -d
|
54 |
|
55 |
-
#
|
56 |
docker run -itd --gpu=alls -p 8298:8298 -v ./pretrained-models:/app/pretrained-models -n viet-tts-service viet-tts:latest viettts server --host 0.0.0.0 --port 8298
|
57 |
-
|
58 |
-
# Show available voices
|
59 |
-
docker exec viet-tts-service viettts show-voices
|
60 |
```
|
61 |
|
62 |
## 🚀 Usage
|
@@ -106,11 +120,14 @@ viettts --help
|
|
106 |
# Start API Server
|
107 |
viettts server --host 0.0.0.0 --port 8298
|
108 |
|
109 |
-
# Synthesis speech from text
|
110 |
-
viettts synthesis --text "Xin chào" --voice 0 --output test.wav
|
111 |
-
|
112 |
# List all built-in voices
|
113 |
viettts show-voices
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
```
|
115 |
|
116 |
### API Client
|
@@ -142,14 +159,24 @@ with client.audio.speech.with_streaming_response.create(
|
|
142 |
|
143 |
#### CURL
|
144 |
```bash
|
|
|
|
|
|
|
|
|
145 |
curl http://localhost:8298/v1/audio/speech \
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
--output speech.wav
|
154 |
```
|
155 |
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- vi
|
4 |
+
- en
|
5 |
+
pipeline_tag: text-to-speech
|
6 |
+
license: apache-2.0
|
7 |
+
tags:
|
8 |
+
- tts
|
9 |
+
- text-to-speech
|
10 |
+
- vietnamese
|
11 |
+
- speech-synthesis
|
12 |
+
- speech,
|
13 |
+
- viet-tts
|
14 |
+
- viettts
|
15 |
+
---
|
16 |
<!-- # VietTTS: An Open-Source Vietnamese Text to Speech -->
|
17 |
<p align="center">
|
18 |
+
<img src="assets/viet-tts-medium.png" style="width: 200px">
|
19 |
<h1 align="center"style="color: white; font-weight: bold; font-family:roboto"><span style="color: white; font-weight: bold; font-family:roboto">VietTTS</span>: An Open-Source Vietnamese Text to Speech</h1>
|
20 |
</p>
|
21 |
<p align="center">
|
22 |
<a href="https://github.com/dangvansam/viet-tts"><img src="https://img.shields.io/github/stars/dangvansam/viet-tts?style=social"></a>
|
23 |
+
<a href="https://huggingface.co/dangvansam/viet-tts"><img src="https://img.shields.io/badge/%F0%9F%A4%97HuggingFace-Model-yellow"></a>
|
24 |
+
<a href="https://huggingface.co/dangvansam/viet-tts"><img src="https://img.shields.io/badge/%F0%9F%A4%97HuggingFace-Demo-green"></a>
|
25 |
+
<a href="https://github.com/dangvansam/viet-tts"><img src="https://img.shields.io/badge/Python-3.10-green"></a>
|
26 |
+
<!-- <a href="https://pypi.org/project/viet-tts" target="_blank"><img src="https://img.shields.io/pypi/v/viet-tts.svg" alt="PyPI Version"> -->
|
27 |
+
<a href="LICENSE"><img src="https://img.shields.io/github/license/dangvansam/viet-asr"></a>
|
28 |
+
</a>
|
29 |
+
<br>
|
30 |
+
<a href="README.md"><img src="https://img.shields.io/badge/README-English-blue"></a>
|
31 |
+
<a href="README_VN.md"><img src="https://img.shields.io/badge/README-Tiếng Việt-red"></a>
|
32 |
</p>
|
33 |
|
34 |
**VietTTS** is an open-source toolkit providing the community with a powerful Vietnamese TTS model, capable of natural voice synthesis and robust voice cloning. Designed for effective experimentation, **VietTTS** supports research and application in Vietnamese voice technologies.
|
35 |
|
36 |
## ⭐ Key Features
|
37 |
- **TTS**: Text-to-Speech generation with any voice via prompt audio
|
38 |
+
- **OpenAI-API-compatible**: Compatible with OpenAI's Text-to-Speech API format
|
39 |
|
40 |
## 🛠️ Installation
|
41 |
|
42 |
+
VietTTS can be installed via a Python installer (Linux only, with Windows and macOS support coming soon) or Docker.
|
43 |
|
44 |
+
### Python Installer (Python>=3.10)
|
45 |
```bash
|
46 |
git clone https://github.com/dangvansam/viet-tts.git
|
47 |
cd viet-tts
|
|
|
69 |
# Run with docker-compose - will create server at: http://localhost:8298
|
70 |
docker compose up -d
|
71 |
|
72 |
+
# Or run with docker run - will create server at: http://localhost:8298
|
73 |
docker run -itd --gpu=alls -p 8298:8298 -v ./pretrained-models:/app/pretrained-models -n viet-tts-service viet-tts:latest viettts server --host 0.0.0.0 --port 8298
|
|
|
|
|
|
|
74 |
```
|
75 |
|
76 |
## 🚀 Usage
|
|
|
120 |
# Start API Server
|
121 |
viettts server --host 0.0.0.0 --port 8298
|
122 |
|
|
|
|
|
|
|
123 |
# List all built-in voices
|
124 |
viettts show-voices
|
125 |
+
|
126 |
+
# Synthesize speech from text with built-in voices
|
127 |
+
viettts synthesis --text "Xin chào" --voice 0 --output test.wav
|
128 |
+
|
129 |
+
# Clone voice from a local audio file
|
130 |
+
viettts synthesis --text "Xin chào" --voice Download/voice.wav --output cloned.wav
|
131 |
```
|
132 |
|
133 |
### API Client
|
|
|
159 |
|
160 |
#### CURL
|
161 |
```bash
|
162 |
+
# Get all built-in voices
|
163 |
+
curl --location http://0.0.0.0:8298/v1/voices
|
164 |
+
|
165 |
+
# OpenAI format (bult-in voices)
|
166 |
curl http://localhost:8298/v1/audio/speech \
|
167 |
+
-H "Authorization: Bearer viet-tts" \
|
168 |
+
-H "Content-Type: application/json" \
|
169 |
+
-d '{
|
170 |
+
"model": "tts-1",
|
171 |
+
"input": "Xin chào Việt Nam.",
|
172 |
+
"voice": "son-tung-mtp"
|
173 |
+
}' \
|
174 |
+
--output speech.wav
|
175 |
+
|
176 |
+
# API with voice from local file
|
177 |
+
curl --location http://0.0.0.0:8298/v1/tts \
|
178 |
+
--form 'text="xin chào"' \
|
179 |
+
--form 'audio_file=@"/home/viettts/Downloads/voice.mp4"' \
|
180 |
--output speech.wav
|
181 |
```
|
182 |
|