Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,14 +6,15 @@ from datasets import load_dataset
|
|
6 |
from transformers import SpeechT5ForTextToSpeech, SpeechT5HifiGan, SpeechT5Processor, pipeline
|
7 |
|
8 |
|
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 |
-
processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
16 |
-
|
17 |
model = SpeechT5ForTextToSpeech.from_pretrained("aoliveira/speecht5_finetuned_voxpopuli_sk").to(device)
|
18 |
#model = SpeechT5ForTextToSpeech.from_pretrained("sanchit-gandhi/speecht5_tts_vox_nl").to(device)
|
19 |
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan").to(device)
|
|
|
6 |
from transformers import SpeechT5ForTextToSpeech, SpeechT5HifiGan, SpeechT5Processor, pipeline
|
7 |
|
8 |
|
9 |
+
#device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
10 |
+
device = "cpu"
|
11 |
|
12 |
# load speech translation checkpoint
|
13 |
asr_pipe = pipeline("automatic-speech-recognition", model="openai/whisper-base", device=device)
|
14 |
|
15 |
# load text-to-speech checkpoint and speaker embeddings
|
16 |
+
#processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
17 |
+
processor = SpeechT5Processor.from_pretrained("aoliveira/speecht5_finetuned_voxpopuli_sk")
|
18 |
model = SpeechT5ForTextToSpeech.from_pretrained("aoliveira/speecht5_finetuned_voxpopuli_sk").to(device)
|
19 |
#model = SpeechT5ForTextToSpeech.from_pretrained("sanchit-gandhi/speecht5_tts_vox_nl").to(device)
|
20 |
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan").to(device)
|