mrfakename
commited on
Commit
β’
994df9c
1
Parent(s):
a0c18ca
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ models = {
|
|
16 |
speaker_ids = models['EN'].hps.data.spk2id
|
17 |
def synthesize(speaker, text, speed, language, progress=gr.Progress()):
|
18 |
bio = io.BytesIO()
|
19 |
-
models[language].tts_to_file(text,
|
20 |
return bio.getvalue()
|
21 |
def load_speakers(language):
|
22 |
return gr.update(choices=list(models[language].hps.data.spk2id.keys()), value=models[language].hps.data.spk2id[list(models[language].hps.data.spk2id.keys())[0]])
|
|
|
16 |
speaker_ids = models['EN'].hps.data.spk2id
|
17 |
def synthesize(speaker, text, speed, language, progress=gr.Progress()):
|
18 |
bio = io.BytesIO()
|
19 |
+
models[language].tts_to_file(text, models[language].hps.data.spk2id[speaker], bio, speed=speed, pbar=progress.tqdm, format='wav')
|
20 |
return bio.getvalue()
|
21 |
def load_speakers(language):
|
22 |
return gr.update(choices=list(models[language].hps.data.spk2id.keys()), value=models[language].hps.data.spk2id[list(models[language].hps.data.spk2id.keys())[0]])
|