Bagus commited on
Commit
8717fa8
1 Parent(s): 21eb2c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -12,9 +12,9 @@ from transformers import (
12
  pipeline,
13
  )
14
 
15
- device = "cuda:0" if torch.cuda.is_available() else "cpu"
16
 
17
- # device = "cpu"
18
  # load speech translation checkpoint
19
  asr_pipe = pipeline("automatic-speech-recognition",
20
  model="openai/whisper-base", device=device)
@@ -48,7 +48,7 @@ def speech_to_speech_translation(audio):
48
 
49
  title = "Cascaded STST"
50
  description = """
51
- Demo for cascaded speech-to-speech translation (STST), mapping from source speech in any language to target speech in Indonesian. Demo uses OpenAI's [Whisper Base](https://huggingface.co/openai/whisper-base) model for speech translation, and Microsoft's
52
  [MMS TTS IND](https://huggingface.co/facebook/mms-tts-ind) model for text-to-speech:
53
  ![Cascaded STST](https://huggingface.co/datasets/huggingface-course/audio-course-images/resolve/main/s2st_cascaded.png "Diagram of cascaded speech to speech translation")
54
  """
 
12
  pipeline,
13
  )
14
 
15
+ # device = "cuda:0" if torch.cuda.is_available() else "cpu"
16
 
17
+ device = "cpu"
18
  # load speech translation checkpoint
19
  asr_pipe = pipeline("automatic-speech-recognition",
20
  model="openai/whisper-base", device=device)
 
48
 
49
  title = "Cascaded STST"
50
  description = """
51
+ Demo for cascaded speech-to-speech translation (STST), mapping from source speech in any language to target speech in Indonesian. Demo uses OpenAI's [Whisper Base](https://huggingface.co/openai/whisper-base) model for speech transcription, [Deep Translator](https://github.com/nidhaloff/deep-translator) for translation, and Meta's
52
  [MMS TTS IND](https://huggingface.co/facebook/mms-tts-ind) model for text-to-speech:
53
  ![Cascaded STST](https://huggingface.co/datasets/huggingface-course/audio-course-images/resolve/main/s2st_cascaded.png "Diagram of cascaded speech to speech translation")
54
  """