Update app.py
Browse files
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": "
|
| 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
|
| 45 |
-
[SpeechT5 TTS](https://huggingface.co/
|
| 46 |
|
| 47 |

|
| 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 |

|
| 48 |
"""
|