elizabetvaganova
commited on
Commit
·
5397141
1
Parent(s):
c6da8d1
Update app.py
Browse files
app.py
CHANGED
@@ -14,8 +14,9 @@ asr_pipe = pipeline("automatic-speech-recognition", model="openai/whisper-base",
|
|
14 |
# load text-to-speech checkpoint and speaker embeddings
|
15 |
processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
16 |
|
17 |
-
|
18 |
-
|
|
|
19 |
|
20 |
embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
|
21 |
speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0)
|
|
|
14 |
# load text-to-speech checkpoint and speaker embeddings
|
15 |
processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
16 |
|
17 |
+
processor = SpeechT5Processor.from_pretrained("facebook/wav2vec2-base-960h")
|
18 |
+
model = SpeechT5ForTextToSpeech.from_pretrained("facebook/wav2vec2-base-960h").to(device)
|
19 |
+
vocoder = SpeechT5HifiGan.from_pretrained("facebook/wav2vec2-base-960h").to(device)
|
20 |
|
21 |
embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
|
22 |
speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0)
|