Try whisper base
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ from transformers import SpeechT5ForTextToSpeech, SpeechT5HifiGan, SpeechT5Proce
|
|
9 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
10 |
|
11 |
# load speech translation checkpoint
|
12 |
-
asr_pipe = pipeline("automatic-speech-recognition", model="openai/whisper-
|
13 |
|
14 |
# load text-to-speech checkpoint and speaker embeddings
|
15 |
tts_checkpoint = "sanchit-gandhi/speecht5_tts_vox_nl"
|
@@ -42,7 +42,7 @@ def speech_to_speech_translation(audio):
|
|
42 |
|
43 |
title = "Cascaded STST"
|
44 |
description = """
|
45 |
-
Demo for cascaded speech-to-speech translation (STST), mapping from source speech in any language to target speech in
|
46 |
[SpeechT5 TTS](https://huggingface.co/sanchit-gandhi/speecht5_tts_vox_nl) model for text-to-speech:
|
47 |
|
48 |
![Cascaded STST](https://huggingface.co/datasets/huggingface-course/audio-course-images/resolve/main/s2st_cascaded.png "Diagram of cascaded speech to speech translation")
|
|
|
9 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
10 |
|
11 |
# load speech translation checkpoint
|
12 |
+
asr_pipe = pipeline("automatic-speech-recognition", model="openai/whisper-base", device=device)
|
13 |
|
14 |
# load text-to-speech checkpoint and speaker embeddings
|
15 |
tts_checkpoint = "sanchit-gandhi/speecht5_tts_vox_nl"
|
|
|
42 |
|
43 |
title = "Cascaded STST"
|
44 |
description = """
|
45 |
+
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 Tiny](https://huggingface.co/openai/whisper-tiny) model for speech translation, and a finetuned
|
46 |
[SpeechT5 TTS](https://huggingface.co/sanchit-gandhi/speecht5_tts_vox_nl) model for text-to-speech:
|
47 |
|
48 |
![Cascaded STST](https://huggingface.co/datasets/huggingface-course/audio-course-images/resolve/main/s2st_cascaded.png "Diagram of cascaded speech to speech translation")
|