StevenLimcorn commited on
Commit
226405b
Β·
1 Parent(s): 346f0e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -7
app.py CHANGED
@@ -20,12 +20,6 @@ fastspeech2 = TFAutoModel.from_pretrained("tensorspeech/tts-fastspeech2-ljspeech
20
  tacotron2 = TFAutoModel.from_pretrained("tensorspeech/tts-tacotron2-ljspeech-en", name="tacotron2")
21
  melgan = TFAutoModel.from_pretrained("tensorspeech/tts-melgan-ljspeech-en", name="melgan")
22
  mb_melgan = TFAutoModel.from_pretrained("tensorspeech/tts-mb_melgan-ljspeech-en", name="mb_melgan")
23
- melgan_stft_config = AutoConfig.from_pretrained('TensorFlowTTS/examples/melgan_stft/conf/melgan_stft.v1.yaml')
24
- melgan_stft = TFAutoModel.from_pretrained(
25
- config=melgan_stft_config,
26
- pretrained_path="melgan.stft-2M.h5",
27
- name="melgan_stft"
28
- )
29
 
30
  MODEL_DICT = {
31
  "Fastspeech2" : fastspeech2,
@@ -67,7 +61,7 @@ def inference(input):
67
  raise ValueError("Only TACOTRON, FASTSPEECH, FASTSPEECH2 are supported on text2mel_name")
68
 
69
  # vocoder part
70
- if vocoder_name == "Melgan" or vocoder_name == "Melgan-STFT":
71
  audio = vocoder_model(mel_outputs)[0, :, 0]
72
  elif vocoder_name == "MB-Melgan":
73
  audio = vocoder_model(mel_outputs)[0, :, 0]
 
20
  tacotron2 = TFAutoModel.from_pretrained("tensorspeech/tts-tacotron2-ljspeech-en", name="tacotron2")
21
  melgan = TFAutoModel.from_pretrained("tensorspeech/tts-melgan-ljspeech-en", name="melgan")
22
  mb_melgan = TFAutoModel.from_pretrained("tensorspeech/tts-mb_melgan-ljspeech-en", name="mb_melgan")
 
 
 
 
 
 
23
 
24
  MODEL_DICT = {
25
  "Fastspeech2" : fastspeech2,
 
61
  raise ValueError("Only TACOTRON, FASTSPEECH, FASTSPEECH2 are supported on text2mel_name")
62
 
63
  # vocoder part
64
+ if vocoder_name == "Melgan":
65
  audio = vocoder_model(mel_outputs)[0, :, 0]
66
  elif vocoder_name == "MB-Melgan":
67
  audio = vocoder_model(mel_outputs)[0, :, 0]