Spaces:
Runtime error
Runtime error
vineetsharma
commited on
Commit
·
0b0e130
1
Parent(s):
7c35a39
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,10 @@ from datasets import load_dataset
|
|
5 |
|
6 |
from transformers import SpeechT5ForTextToSpeech, SpeechT5HifiGan, SpeechT5Processor, pipeline
|
7 |
|
|
|
|
|
|
|
|
|
8 |
|
9 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
10 |
|
@@ -19,12 +23,13 @@ asr_pipe = pipeline("automatic-speech-recognition", model="openai/whisper-base",
|
|
19 |
|
20 |
|
21 |
# For Dutch
|
22 |
-
model_id = 'sanchit-gandhi/speecht5_tts_vox_nl'
|
23 |
|
|
|
|
|
24 |
processor = SpeechT5Processor.from_pretrained(model_id)
|
25 |
model = SpeechT5ForTextToSpeech.from_pretrained(model_id)
|
26 |
|
27 |
-
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")
|
28 |
|
29 |
|
30 |
|
|
|
5 |
|
6 |
from transformers import SpeechT5ForTextToSpeech, SpeechT5HifiGan, SpeechT5Processor, pipeline
|
7 |
|
8 |
+
## Imports for MMS
|
9 |
+
# from transformers import VitsModel, VitsTokenizer
|
10 |
+
|
11 |
+
|
12 |
|
13 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
14 |
|
|
|
23 |
|
24 |
|
25 |
# For Dutch
|
|
|
26 |
|
27 |
+
##### speecht5 #####
|
28 |
+
model_id = 'sanchit-gandhi/speecht5_tts_vox_nl'
|
29 |
processor = SpeechT5Processor.from_pretrained(model_id)
|
30 |
model = SpeechT5ForTextToSpeech.from_pretrained(model_id)
|
31 |
|
32 |
+
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan").to(device)
|
33 |
|
34 |
|
35 |
|