Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,9 +10,9 @@ device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
|
10 |
asr_pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v2", device=device)
|
11 |
|
12 |
# Load MMS TTS model for multilingual text-to-speech (using German model as base)
|
13 |
-
processor = SpeechT5Processor.from_pretrained("facebook/
|
14 |
-
model = SpeechT5ForTextToSpeech.from_pretrained("facebook/
|
15 |
-
vocoder = SpeechT5HifiGan.from_pretrained("facebook/
|
16 |
|
17 |
# Define supported languages (adjust based on the languages supported by the model)
|
18 |
LANGUAGES = {
|
|
|
10 |
asr_pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v2", device=device)
|
11 |
|
12 |
# Load MMS TTS model for multilingual text-to-speech (using German model as base)
|
13 |
+
processor = SpeechT5Processor.from_pretrained("facebook/s2t-medium-mustc-multilingual-st")
|
14 |
+
model = SpeechT5ForTextToSpeech.from_pretrained("facebook/s2t-medium-mustc-multilingual-st").to(device)
|
15 |
+
vocoder = SpeechT5HifiGan.from_pretrained("facebook/s2t-medium-mustc-multilingual-st").to(device)
|
16 |
|
17 |
# Define supported languages (adjust based on the languages supported by the model)
|
18 |
LANGUAGES = {
|