catactivationsound commited on
Commit
2bbb9e5
·
1 Parent(s): 08fdf5d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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": "translate", "language": "hu"})
26
  return outputs["text"]
27
 
28
 
@@ -41,7 +41,7 @@ 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.
45
  Demo uses OpenAI's [Whisper Base](https://huggingface.co/openai/whisper-base) model for speech translation,
46
  and a [finetuned version](https://huggingface.co/catactivationsound/speecht5_finetuned_voxpopuli_hu)
47
  of Microsoft's [SpeechT5 TTS](https://huggingface.co/microsoft/speecht5_tts) for text-to-speech:
 
22
 
23
 
24
  def translate(audio):
25
+ outputs = asr_pipe(audio, max_new_tokens=256, generate_kwargs={"task": "transcribe", "language": "hu"})
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 Hungarian.
45
  Demo uses OpenAI's [Whisper Base](https://huggingface.co/openai/whisper-base) model for speech translation,
46
  and a [finetuned version](https://huggingface.co/catactivationsound/speecht5_finetuned_voxpopuli_hu)
47
  of Microsoft's [SpeechT5 TTS](https://huggingface.co/microsoft/speecht5_tts) for text-to-speech: