nareauow commited on
Commit
8489440
·
verified ·
1 Parent(s): 93b8af8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
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
- embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
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