TenzinGayche commited on
Commit
db081ea
β€’
1 Parent(s): d623743

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -69,7 +69,7 @@ def predict(text, speaker):
69
  # limit input length
70
  input_ids = inputs["input_ids"]
71
  input_ids = input_ids[..., :model.config.max_text_positions]
72
- speaker_embedding = np.load(speaker_embeddings[speaker], allow_pickle=True)
73
  speaker_embedding = torch.tensor(speaker_embedding)
74
  speech = model.generate_speech(input_ids.to('cuda'), speaker_embedding.to('cuda'), vocoder=vocoder.to('cuda'))
75
  speech = nr.reduce_noise(y=speech.to('cpu'), sr=16000)
 
69
  # limit input length
70
  input_ids = inputs["input_ids"]
71
  input_ids = input_ids[..., :model.config.max_text_positions]
72
+ speaker_embedding = np.load(speaker_embeddings[speaker])
73
  speaker_embedding = torch.tensor(speaker_embedding)
74
  speech = model.generate_speech(input_ids.to('cuda'), speaker_embedding.to('cuda'), vocoder=vocoder.to('cuda'))
75
  speech = nr.reduce_noise(y=speech.to('cpu'), sr=16000)