Spaces:
Runtime error
Runtime error
StevenLimcorn
commited on
Commit
β’
5f1f473
1
Parent(s):
70e4553
Update app.py
Browse files
app.py
CHANGED
@@ -13,6 +13,8 @@ import gradio as gr
|
|
13 |
MODEL_NAMES = [
|
14 |
"Fastspeech2 + Melgan",
|
15 |
"Tacotron2 + Melgan",
|
|
|
|
|
16 |
]
|
17 |
|
18 |
fastspeech = TFAutoModel.from_pretrained("tensorspeech/tts-fastspeech-ljspeech-en", name="fastspeech")
|
@@ -34,7 +36,7 @@ def inference(input_text, model_type):
|
|
34 |
processor = AutoProcessor.from_pretrained("tensorspeech/tts-tacotron2-ljspeech-en")
|
35 |
input_ids = processor.text_to_sequence(input_text)
|
36 |
|
37 |
-
if text2mel_name == "
|
38 |
_, mel_outputs, stop_token_prediction, alignment_history = text2mel_model.inference(
|
39 |
tf.expand_dims(tf.convert_to_tensor(input_ids, dtype=tf.int32), 0),
|
40 |
tf.convert_to_tensor([len(input_ids)], tf.int32),
|
|
|
13 |
MODEL_NAMES = [
|
14 |
"Fastspeech2 + Melgan",
|
15 |
"Tacotron2 + Melgan",
|
16 |
+
"Tacotron2 + MB-Melgan",
|
17 |
+
"Fastspeech2 + MB-Melgan"
|
18 |
]
|
19 |
|
20 |
fastspeech = TFAutoModel.from_pretrained("tensorspeech/tts-fastspeech-ljspeech-en", name="fastspeech")
|
|
|
36 |
processor = AutoProcessor.from_pretrained("tensorspeech/tts-tacotron2-ljspeech-en")
|
37 |
input_ids = processor.text_to_sequence(input_text)
|
38 |
|
39 |
+
if text2mel_name == "Tacotron2":
|
40 |
_, mel_outputs, stop_token_prediction, alignment_history = text2mel_model.inference(
|
41 |
tf.expand_dims(tf.convert_to_tensor(input_ids, dtype=tf.int32), 0),
|
42 |
tf.convert_to_tensor([len(input_ids)], tf.int32),
|