Spaces:
Runtime error
Runtime error
divakaivan
commited on
Update app.py
Browse files
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(
|
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"),
|