Spaces:
Runtime error
Runtime error
cocktailpeanut
commited on
Commit
•
d798cbb
1
Parent(s):
19dca80
update
Browse files- app.py +4 -3
- requirements.txt +2 -1
app.py
CHANGED
@@ -13,6 +13,7 @@ else:
|
|
13 |
#device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
14 |
|
15 |
languages = ["EN", "ES", "FR", "ZH", "JP", "KR"]
|
|
|
16 |
|
17 |
#model = TTS(language='EN', device=device)
|
18 |
def synthesize(language, speaker, text, speed=1.0, progress=gr.Progress()):
|
@@ -24,14 +25,14 @@ def synthesize(language, speaker, text, speed=1.0, progress=gr.Progress()):
|
|
24 |
|
25 |
def lang(language):
|
26 |
if language == "EN":
|
27 |
-
return gr.update(choices=
|
28 |
else:
|
29 |
-
return gr.update(choices=[language])
|
30 |
with gr.Blocks() as demo:
|
31 |
gr.Markdown('# MeloTTS\n\nAn unofficial demo of [MeloTTS](https://github.com/myshell-ai/MeloTTS) from MyShell AI. MeloTTS is a permissively licensed (MIT) SOTA multi-speaker TTS model.\n\nI am not affiliated with MyShell AI in any way.\n\nThis demo currently only supports English, but the model itself supports other languages.')
|
32 |
with gr.Group():
|
33 |
language = gr.Dropdown(languages, interactive=True, value='EN', label='Language')
|
34 |
-
speaker = gr.Dropdown(
|
35 |
speed = gr.Slider(label='Speed', minimum=0.1, maximum=10.0, value=1.0, interactive=True, step=0.1)
|
36 |
text = gr.Textbox(label="Text to speak", value='The field of text to speech has seen rapid development recently')
|
37 |
language.change(fn=lang, inputs=[language], outputs=[speaker])
|
|
|
13 |
#device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
14 |
|
15 |
languages = ["EN", "ES", "FR", "ZH", "JP", "KR"]
|
16 |
+
en = ["EN-Default", "EN-US", "EN-BR", "EN_INDIA", "EN-AU"]
|
17 |
|
18 |
#model = TTS(language='EN', device=device)
|
19 |
def synthesize(language, speaker, text, speed=1.0, progress=gr.Progress()):
|
|
|
25 |
|
26 |
def lang(language):
|
27 |
if language == "EN":
|
28 |
+
return gr.update(choices=en, value="EN-Default")
|
29 |
else:
|
30 |
+
return gr.update(choices=[language], value=language)
|
31 |
with gr.Blocks() as demo:
|
32 |
gr.Markdown('# MeloTTS\n\nAn unofficial demo of [MeloTTS](https://github.com/myshell-ai/MeloTTS) from MyShell AI. MeloTTS is a permissively licensed (MIT) SOTA multi-speaker TTS model.\n\nI am not affiliated with MyShell AI in any way.\n\nThis demo currently only supports English, but the model itself supports other languages.')
|
33 |
with gr.Group():
|
34 |
language = gr.Dropdown(languages, interactive=True, value='EN', label='Language')
|
35 |
+
speaker = gr.Dropdown(en, interactive=True, value='EN-Default', label='Speaker')
|
36 |
speed = gr.Slider(label='Speed', minimum=0.1, maximum=10.0, value=1.0, interactive=True, step=0.1)
|
37 |
text = gr.Textbox(label="Text to speak", value='The field of text to speech has seen rapid development recently')
|
38 |
language.change(fn=lang, inputs=[language], outputs=[speaker])
|
requirements.txt
CHANGED
@@ -4,7 +4,8 @@ tqdm
|
|
4 |
transformers==4.27.4
|
5 |
mecab-python3==1.0.5
|
6 |
num2words==0.5.12
|
7 |
-
unidic_lite==1.0.8
|
|
|
8 |
unidic==1.1.0
|
9 |
mecab-python3==1.0.5
|
10 |
pykakasi==2.2.1
|
|
|
4 |
transformers==4.27.4
|
5 |
mecab-python3==1.0.5
|
6 |
num2words==0.5.12
|
7 |
+
#unidic_lite==1.0.8
|
8 |
+
unidic-lite
|
9 |
unidic==1.1.0
|
10 |
mecab-python3==1.0.5
|
11 |
pykakasi==2.2.1
|