Update app.py
Browse files
app.py
CHANGED
|
@@ -17,8 +17,8 @@ processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
|
| 17 |
model = SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts").to(device)
|
| 18 |
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan").to(device)
|
| 19 |
|
| 20 |
-
embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
|
| 21 |
-
speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0)
|
| 22 |
|
| 23 |
|
| 24 |
def translate(audio):
|
|
|
|
| 17 |
model = SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts").to(device)
|
| 18 |
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan").to(device)
|
| 19 |
|
| 20 |
+
# embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
|
| 21 |
+
# speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0)
|
| 22 |
|
| 23 |
|
| 24 |
def translate(audio):
|