MoHamdyy commited on
Commit
91c76f8
·
1 Parent(s): 083a5c8

Fix syntax error in TTS stage and complete pipeline

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -441,7 +441,7 @@ def full_speech_translation_pipeline(audio_input_path: str):
441
  try:
442
  print("TTS: Synthesizing English speech...")
443
  sequence = text_to_seq(english_translation).unsqueeze(0).to(DEVICE)
444
- generated_mel, _ = TTS_MODEL.inference(sequence, max_length=hp.max_mel_time-20, stop_token_threshold=0.5, with_tqdm=False)
445
 
446
  print(f"TTS: Generated mel shape: {generated_mel.shape if generated_mel is not None else 'None'}")
447
  if generated_mel is not None and generated_mel.numel() > 0:
 
441
  try:
442
  print("TTS: Synthesizing English speech...")
443
  sequence = text_to_seq(english_translation).unsqueeze(0).to(DEVICE)
444
+ generated_mel, _ = TTS_MODEL.inference(sequence, max_length=hp.max_mel_time-20, stop_token_threshold=0.3, with_tqdm=False)
445
 
446
  print(f"TTS: Generated mel shape: {generated_mel.shape if generated_mel is not None else 'None'}")
447
  if generated_mel is not None and generated_mel.numel() > 0: