divakaivan commited on
Commit
d5a510c
·
verified ·
1 Parent(s): fd82718

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -10
app.py CHANGED
@@ -49,7 +49,7 @@ def predict(text, speaker):
49
  else:
50
  speaker_embedding = np.load(speaker_embeddings[speaker[:3]])
51
 
52
- speaker_embedding = torch.tensor(speaker_embedding).unsqueeze(0)
53
 
54
  speech = model.generate_speech(input_ids, speaker_embedding, vocoder=vocoder)
55
 
@@ -111,15 +111,6 @@ gr.Interface(
111
  fn=predict,
112
  inputs=[
113
  gr.Text(label="Input Text"),
114
- gr.Radio(label="Speaker", choices=[
115
- "BDL (male)",
116
- "CLB (female)",
117
- "KSP (male)",
118
- "RMS (male)",
119
- "SLT (female)",
120
- "Surprise Me!"
121
- ],
122
- value="BDL (male)"),
123
  ],
124
  outputs=[
125
  gr.Audio(label="Generated Speech", type="numpy"),
 
49
  else:
50
  speaker_embedding = np.load(speaker_embeddings[speaker[:3]])
51
 
52
+ speaker_embedding = torch.tensor([1, 512]).unsqueeze(0)
53
 
54
  speech = model.generate_speech(input_ids, speaker_embedding, vocoder=vocoder)
55
 
 
111
  fn=predict,
112
  inputs=[
113
  gr.Text(label="Input Text"),
 
 
 
 
 
 
 
 
 
114
  ],
115
  outputs=[
116
  gr.Audio(label="Generated Speech", type="numpy"),