elizabetvaganova
commited on
Commit
·
ce84ec1
1
Parent(s):
4776509
Update app.py
Browse files
app.py
CHANGED
@@ -15,10 +15,10 @@ asr_pipe = pipeline("automatic-speech-recognition", model="openai/whisper-base",
|
|
15 |
processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
16 |
|
17 |
# Using a different text-to-speech model (replace 'your_text_to_speech_model' with the model you want to use)
|
18 |
-
model = SpeechT5ForTextToSpeech.from_pretrained("
|
19 |
|
20 |
# Using a different vocoder model (replace 'your_vocoder_model' with the model you want to use)
|
21 |
-
vocoder = SpeechT5HifiGan.from_pretrained("
|
22 |
|
23 |
embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
|
24 |
speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0)
|
|
|
15 |
processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
16 |
|
17 |
# Using a different text-to-speech model (replace 'your_text_to_speech_model' with the model you want to use)
|
18 |
+
model = SpeechT5ForTextToSpeech.from_pretrained("elizabetvaganova/speech-to-speech-translation-vaganova").to(device)
|
19 |
|
20 |
# Using a different vocoder model (replace 'your_vocoder_model' with the model you want to use)
|
21 |
+
vocoder = SpeechT5HifiGan.from_pretrained("elizabetvaganova/speech-to-speech-translation-vaganova").to(device)
|
22 |
|
23 |
embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
|
24 |
speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0)
|