mmhamdy commited on
Commit
070b1cd
·
1 Parent(s): 2987d07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -22,7 +22,7 @@ speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze
22
 
23
 
24
  def translate(audio):
25
- outputs = asr_pipe(audio, max_new_tokens=256, generate_kwargs={"task": "transcribe", "language": "it"})
26
  return outputs["text"]
27
 
28
 
@@ -41,8 +41,8 @@ def speech_to_speech_translation(audio):
41
 
42
  title = "Cascaded STST"
43
  description = """
44
- Demo for cascaded speech-to-speech translation (STST), mapping from source speech in any language to target speech in English. Demo uses OpenAI's [Whisper Base](https://huggingface.co/openai/whisper-base) model for speech translation, and Microsoft's
45
- [SpeechT5 TTS](https://huggingface.co/microsoft/speecht5_tts) model for text-to-speech:
46
 
47
  ![Cascaded STST](https://huggingface.co/datasets/huggingface-course/audio-course-images/resolve/main/s2st_cascaded.png "Diagram of cascaded speech to speech translation")
48
  """
 
22
 
23
 
24
  def translate(audio):
25
+ outputs = asr_pipe(audio, max_new_tokens=256, generate_kwargs={"task": "translate", "language": "italian"})
26
  return outputs["text"]
27
 
28
 
 
41
 
42
  title = "Cascaded STST"
43
  description = """
44
+ Demo for cascaded speech-to-speech translation (STST), mapping from source speech in English to target speech in Italian. Demo uses OpenAI's [Whisper Base](https://huggingface.co/openai/whisper-base) model for speech translation, and a finetuned Microsoft's
45
+ [SpeechT5 TTS](https://huggingface.co/mmhamdy/speecht5-finetuned-fleurs-it-it) model for text-to-speech:
46
 
47
  ![Cascaded STST](https://huggingface.co/datasets/huggingface-course/audio-course-images/resolve/main/s2st_cascaded.png "Diagram of cascaded speech to speech translation")
48
  """