ovieyra21 commited on
Commit
e7b531f
·
verified ·
1 Parent(s): c05d110

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -10,6 +10,8 @@ device = "cuda:0" if torch.cuda.is_available() else "cpu"
10
 
11
  # load speech translation checkpoint
12
  asr_pipe = pipeline("automatic-speech-recognition", model="openai/whisper-base", device=device)
 
 
13
 
14
  # load text-to-speech checkpoint and speaker embeddings
15
  processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
 
10
 
11
  # load speech translation checkpoint
12
  asr_pipe = pipeline("automatic-speech-recognition", model="openai/whisper-base", device=device)
13
+ forced_decoder_ids = processor.get_decoder_prompt_ids(language="spanish", task="translate")
14
+
15
 
16
  # load text-to-speech checkpoint and speaker embeddings
17
  processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")