Skip to content

Commit 4567dfc

Browse files
update README.md
1 parent b0a5d0b commit 4567dfc

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

README.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Zalo Text-To-Speech
2+
3+
## I. Introduction
4+
5+
[Zalo Text-To-Speech (ZTTS)](https://zalo.ai/docs/api/text-to-audio-converter) engine delivers fast and premium quality audios from input Vietnamese text. ZTTS is optimized for realtime and high volume traffic applications such as news websites, voice streaming services, chatbots, and virtual assistants. ZTTS currently supports four Vietnamese voices including two Northern accents and two Southern accents.
6+
7+
## II. Install ZaloTTS
8+
9+
ZaloTTS supports python >= 3.7, <3.9
10+
11+
Installing from PyPI is the easiest option.
12+
13+
```bash
14+
$ pip install ZaloTTS
15+
```
16+
17+
## III. API_KEY
18+
19+
Get api key [here](https://zalo.ai/docs/api/getting-started).
20+
21+
You can use the api key as an argument to initialize the ZaloTTS object.
22+
23+
Or you can assign the environment variable ZALO_API_KEY in the `.env` file. The api key will be used when you initialize the ZaloTTS object.
24+
25+
```plaintext
26+
# .env
27+
ZALO_API_KEY = {your_api_key}
28+
```
29+
30+
## III. Speakers
31+
32+
|ID|Name |Constant |
33+
|--|--------------|----------------------|
34+
|1 |South women |ZaloTTS.SOUTH_WOMEN |
35+
|2 |Northern women|ZaloTTS.NORTHERN_WOMEN|
36+
|3 |South men |ZaloTTS.SOUTH_MEN |
37+
|4 |Northern men |ZaloTTS.NORTHERN_MEN |
38+
39+
## IV. Examples
40+
41+
```python
42+
from zalo_tts import ZaloTTS
43+
44+
tts = ZaloTTS(speaker=ZaloTTS.NORTHERN_MEN)
45+
tts.text_to_speech("Câu lạc bộ học thuật ICON xin chào các bạn.")
46+
```

demo.py

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from zalo_tts import ZaloTTS
2+
3+
tts = ZaloTTS(speaker=ZaloTTS.NORTHERN_MEN)
4+
tts.text_to_speech("Câu lạc bộ học thuật ICON xin chào các bạn.")

0 commit comments

Comments
 (0)