mrfakename commited on
Commit
19d70cb
1 Parent(s): 4300fed
Files changed (1) hide show
  1. README.md +8 -162
README.md CHANGED
@@ -1,162 +1,8 @@
1
- <div align="center">
2
- <div>&nbsp;</div>
3
- <img src="logo.png" width="200"/>
4
- </div>
5
-
6
- ## Introduction
7
- MeloTTS is a **high-quality multi-lingual** text-to-speech library by [MyShell.ai](https://myshell.ai). Supported languages include:
8
-
9
- | Language | Example |
10
- | --- | --- |
11
- | English | [Link](https://myshell-public-repo-hosting.s3.amazonaws.com/myshellttsbase/examples/en/EN-Default/speed_1.0/sent_000.wav) |
12
- | English (American) | [Link](https://myshell-public-repo-hosting.s3.amazonaws.com/myshellttsbase/examples/en/EN-US/speed_1.0/sent_000.wav) |
13
- | English (British) | [Link](https://myshell-public-repo-hosting.s3.amazonaws.com/myshellttsbase/examples/en/EN-BR/speed_1.0/sent_000.wav) |
14
- | English (Indian) | [Link](https://myshell-public-repo-hosting.s3.amazonaws.com/myshellttsbase/examples/en/EN_INDIA/speed_1.0/sent_000.wav) |
15
- | English (Australian) | [Link](https://myshell-public-repo-hosting.s3.amazonaws.com/myshellttsbase/examples/en/EN-AU/speed_1.0/sent_000.wav) |
16
- | Spanish | [Link](https://myshell-public-repo-hosting.s3.amazonaws.com/myshellttsbase/examples/es/ES/speed_1.0/sent_000.wav) |
17
- | French | [Link](https://myshell-public-repo-hosting.s3.amazonaws.com/myshellttsbase/examples/fr/FR/speed_1.0/sent_000.wav) |
18
- | Chinese (mix EN) | [Link](https://myshell-public-repo-hosting.s3.amazonaws.com/myshellttsbase/examples/zh/ZH/speed_1.0/sent_008.wav) |
19
- | Japanese | [Link](https://myshell-public-repo-hosting.s3.amazonaws.com/myshellttsbase/examples/jp/JP/speed_1.0/sent_000.wav) |
20
- | Korean | [Link](https://myshell-public-repo-hosting.s3.amazonaws.com/myshellttsbase/examples/kr/KR/speed_1.0/sent_000.wav) |
21
-
22
- Some other features include:
23
- - The Chinese speaker supports `mixed Chinese and English`.
24
- - Fast enough for `CPU real-time inference`.
25
-
26
- ## Install on Linux
27
- ```bash
28
- git clone [email protected]:myshell-ai/MeloTTS.git
29
- cd MeloTTS
30
- pip install -e .
31
- python -m unidic download
32
- ```
33
- We welcome the open-source community to make this repo `Mac` and `Windows` compatible. If you find this repo useful, please consider contributing to the repo.
34
-
35
- ## Usage
36
-
37
- ### English with Multi Accents
38
- ```python
39
- from melo.api import TTS
40
-
41
- # Speed is adjustable
42
- speed = 1.0
43
-
44
- # CPU is sufficient for real-time inference.
45
- # You can also change to cuda:0
46
- device = 'cpu'
47
-
48
- # English
49
- text = "Did you ever hear a folk tale about a giant turtle?"
50
- model = TTS(language='EN', device=device)
51
- speaker_ids = model.hps.data.spk2id
52
-
53
- # Default accent
54
- output_path = 'en-default.wav'
55
- model.tts_to_file(text, speaker_ids['EN-Default'], output_path, speed=speed)
56
-
57
- # American accent
58
- output_path = 'en-us.wav'
59
- model.tts_to_file(text, speaker_ids['EN-US'], output_path, speed=speed)
60
-
61
- # British accent
62
- output_path = 'en-br.wav'
63
- model.tts_to_file(text, speaker_ids['EN-BR'], output_path, speed=speed)
64
-
65
- # Indian accent
66
- output_path = 'en-india.wav'
67
- model.tts_to_file(text, speaker_ids['EN_INDIA'], output_path, speed=speed)
68
-
69
- # Australian accent
70
- output_path = 'en-au.wav'
71
- model.tts_to_file(text, speaker_ids['EN-AU'], output_path, speed=speed)
72
-
73
- ```
74
-
75
- ### Spanish
76
- ```python
77
- from melo.api import TTS
78
-
79
- # Speed is adjustable
80
- speed = 1.0
81
-
82
- # CPU is sufficient for real-time inference.
83
- # You can also change to cuda:0
84
- device = 'cpu'
85
-
86
- text = "El resplandor del sol acaricia las olas, pintando el cielo con una paleta deslumbrante."
87
- model = TTS(language='ES', device=device)
88
- speaker_ids = model.hps.data.spk2id
89
-
90
- output_path = 'es.wav'
91
- model.tts_to_file(text, speaker_ids['ES'], output_path, speed=speed)
92
- ```
93
-
94
- ### French
95
- ```python
96
- from melo.api import TTS
97
-
98
- # Speed is adjustable
99
- speed = 1.0
100
- device = 'cpu' # or cuda:0
101
-
102
- text = "La lueur dorée du soleil caresse les vagues, peignant le ciel d'une palette éblouissante."
103
- model = TTS(language='FR', device=device)
104
- speaker_ids = model.hps.data.spk2id
105
-
106
- output_path = 'fr.wav'
107
- model.tts_to_file(text, speaker_ids['FR'], output_path, speed=speed)
108
- ```
109
-
110
- ### Chinese
111
- ```python
112
- from melo.api import TTS
113
-
114
- # Speed is adjustable
115
- speed = 1.0
116
- device = 'cpu' # or cuda:0
117
-
118
- text = "我最近在学习machine learning,希望能够在未来的artificial intelligence领域有所建树。"
119
- model = TTS(language='ZH', device=device)
120
- speaker_ids = model.hps.data.spk2id
121
-
122
- output_path = 'zh.wav'
123
- model.tts_to_file(text, speaker_ids['ZH'], output_path, speed=speed)
124
- ```
125
-
126
- ### Japanese
127
- ```python
128
- from melo.api import TTS
129
-
130
- # Speed is adjustable
131
- speed = 1.0
132
- device = 'cpu' # or cuda:0
133
-
134
- text = "彼は毎朝ジョギングをして体を健康に保っています。"
135
- model = TTS(language='JP', device=device)
136
- speaker_ids = model.hps.data.spk2id
137
-
138
- output_path = 'jp.wav'
139
- model.tts_to_file(text, speaker_ids['JP'], output_path, speed=speed)
140
- ```
141
-
142
- ### Korean
143
- ```python
144
- from melo.api import TTS
145
-
146
- # Speed is adjustable
147
- speed = 1.0
148
- device = 'cpu' # or cuda:0
149
-
150
- text = "안녕하세요! 오늘은 날씨가 정말 좋네요."
151
- model = TTS(language='KR', device=device)
152
- speaker_ids = model.hps.data.spk2id
153
-
154
- output_path = 'kr.wav'
155
- model.tts_to_file(text, speaker_ids['KR'], output_path, speed=speed)
156
- ```
157
-
158
- ## License
159
- This library is under MIT License. Free for both commercial and non-commercial use.
160
-
161
- ## Acknowledgement
162
- This implementation is based on several excellent projects, [TTS](https://github.com/coqui-ai/TTS), [VITS](https://github.com/jaywalnut310/vits), [VITS2](https://github.com/daniilrobnikov/vits2) and [Bert-VITS2](https://github.com/fishaudio/Bert-VITS2). We appreciate their awesome work!
 
1
+ ---
2
+ title: MeloTTS
3
+ colorFrom: blue
4
+ colorTo: blue
5
+ sdk: gradio
6
+ app_file: app.py
7
+ pinned: false
8
+ ---