Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -34,9 +34,7 @@ try:
|
|
34 |
tts_vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan").to(device)
|
35 |
|
36 |
# Load speaker embeddings
|
37 |
-
|
38 |
-
speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0).to(device)
|
39 |
-
print("Text-to-speech models loaded successfully!")
|
40 |
except Exception as e:
|
41 |
print(f"Error loading text-to-speech models: {e}")
|
42 |
tts_processor = None
|
|
|
34 |
tts_vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan").to(device)
|
35 |
|
36 |
# Load speaker embeddings
|
37 |
+
speaker_embeddings = torch.load("./speaker_embedding.pt").to(device)
|
|
|
|
|
38 |
except Exception as e:
|
39 |
print(f"Error loading text-to-speech models: {e}")
|
40 |
tts_processor = None
|