crcdng commited on
Commit
19f6e5d
1 Parent(s): d88edc1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -6,8 +6,6 @@ from datasets import load_dataset
6
  from transformers import SpeechT5ForTextToSpeech, SpeechT5HifiGan, SpeechT5Processor, pipeline
7
  from transformers import VitsModel, VitsTokenizer
8
 
9
-
10
-
11
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
12
 
13
  # load speech translation checkpoint
@@ -17,8 +15,8 @@ asr_pipe = pipeline("automatic-speech-recognition", model="openai/whisper-base",
17
  processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
18
 
19
  # model = SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts").to(device)
20
- model = VitsModel.from_pretrained("Matthijs/mms-tts-nld").to(device)
21
- tokenizer = VitsTokenizer.from_pretrained("Matthijs/mms-tts-nld").to(device)
22
 
23
  vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan").to(device)
24
 
 
6
  from transformers import SpeechT5ForTextToSpeech, SpeechT5HifiGan, SpeechT5Processor, pipeline
7
  from transformers import VitsModel, VitsTokenizer
8
 
 
 
9
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
10
 
11
  # load speech translation checkpoint
 
15
  processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
16
 
17
  # model = SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts").to(device)
18
+ # model = VitsModel.from_pretrained("Matthijs/mms-tts-nld").to(device)
19
+ # tokenizer = VitsTokenizer.from_pretrained("Matthijs/mms-tts-nld").to(device)
20
 
21
  vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan").to(device)
22