Update app.py
Browse files
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 |
-
|
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
|
52 |
[MMS TTS IND](https://huggingface.co/facebook/mms-tts-ind) model for text-to-speech:
|
53 |

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

|
54 |
"""
|