constantinSch commited on
Commit
8d72ef6
·
verified ·
1 Parent(s): fb39736

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
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" : "<|de|>"})
26
  return outputs["text"]
27
 
28
 
@@ -41,10 +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
  """
49
 
50
  demo = gr.Blocks()
 
22
 
23
 
24
  def translate(audio):
25
+ outputs = asr_pipe(audio, max_new_tokens=256, generate_kwargs={"task": "transcribe", "language" : "<|nl|>"})
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 any language to target speech in Dutch. Demo uses OpenAI's [Whisper Base](https://huggingface.co/openai/whisper-base) model for speech translation, and a Dutch Fine-Tune of Microsoft's
45
+ [sanchit-gandhi/speecht5_tts_vox_nl](https://huggingface.co/sanchit-gandhi/speecht5_tts_vox_nl) model for text-to-speech:
 
 
46
  """
47
 
48
  demo = gr.Blocks()