taohoang commited on
Commit
a81a2a5
1 Parent(s): 9e629b7

Try whisper base

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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-tiny", device=device)
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 Netherland. 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")
 
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")