Spaces:
Runtime error
Runtime error
Updated to transcribe in catalan :o and README
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze
|
|
27 |
|
28 |
|
29 |
def translate(audio):
|
30 |
-
outputs = asr_pipe(audio, max_new_tokens=256, generate_kwargs={"task": "
|
31 |
return outputs["text"]
|
32 |
|
33 |
|
@@ -44,10 +44,10 @@ def speech_to_speech_translation(audio):
|
|
44 |
return 16000, synthesised_speech
|
45 |
|
46 |
|
47 |
-
title = "
|
48 |
description = """
|
49 |
-
Demo for cascaded speech-to-speech translation (STST), mapping from source speech in any language to target speech in
|
50 |
-
[SpeechT5 TTS](https://huggingface.co/microsoft/speecht5_tts) model for text-to-speech:
|
51 |
|
52 |
![Cascaded STST](https://huggingface.co/datasets/huggingface-course/audio-course-images/resolve/main/s2st_cascaded.png "Diagram of cascaded speech to speech translation")
|
53 |
"""
|
|
|
27 |
|
28 |
|
29 |
def translate(audio):
|
30 |
+
outputs = asr_pipe(audio, max_new_tokens=256, generate_kwargs={"task": "transcribe", "language": "catalan"})
|
31 |
return outputs["text"]
|
32 |
|
33 |
|
|
|
44 |
return 16000, synthesised_speech
|
45 |
|
46 |
|
47 |
+
title = "Demo STST - Multilingual to Català Speech"
|
48 |
description = """
|
49 |
+
Demo for cascaded speech-to-speech translation (STST), mapping from source speech in any language to target speech in Català. Demo uses OpenAI's [Whisper Base](https://huggingface.co/openai/whisper-base) model for speech translation to català, and Microsoft's
|
50 |
+
[SpeechT5 TTS](https://huggingface.co/microsoft/speecht5_tts) model for text-to-speech fine-tuned on [projecte-aina/openslr-slr69-ca-trimmed-denoised](https://huggingface.co/datasets/projecte-aina/openslr-slr69-ca-trimmed-denoised). This demo can be improve updating it with [projecte-aina/tts-ca-coqui-vits-multispeaker](https://huggingface.co/projecte-aina/tts-ca-coqui-vits-multispeaker) model:
|
51 |
|
52 |
![Cascaded STST](https://huggingface.co/datasets/huggingface-course/audio-course-images/resolve/main/s2st_cascaded.png "Diagram of cascaded speech to speech translation")
|
53 |
"""
|