Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -75,7 +75,7 @@ def tts_fn(text):
|
|
75 |
x_tst = stn_tst.unsqueeze(0)
|
76 |
x_tst_lengths = LongTensor([stn_tst.size(0)])
|
77 |
audio = net_g.infer(x_tst, x_tst_lengths, noise_scale=.667, noise_scale_w=0.8, length_scale=1)[0][
|
78 |
-
0, 0].data.
|
79 |
return "Success", (hps.data.sampling_rate, audio)
|
80 |
|
81 |
|
@@ -90,6 +90,6 @@ if __name__ == '__main__':
|
|
90 |
tts_submit = gr.Button("Generate", variant="primary")
|
91 |
tts_output1 = gr.Textbox(label="Output Message")
|
92 |
tts_output2 = gr.Audio(label="Output Audio")
|
93 |
-
tts_submit.click(tts_fn,
|
94 |
|
95 |
app.launch()
|
|
|
75 |
x_tst = stn_tst.unsqueeze(0)
|
76 |
x_tst_lengths = LongTensor([stn_tst.size(0)])
|
77 |
audio = net_g.infer(x_tst, x_tst_lengths, noise_scale=.667, noise_scale_w=0.8, length_scale=1)[0][
|
78 |
+
0, 0].data.float().numpy()
|
79 |
return "Success", (hps.data.sampling_rate, audio)
|
80 |
|
81 |
|
|
|
90 |
tts_submit = gr.Button("Generate", variant="primary")
|
91 |
tts_output1 = gr.Textbox(label="Output Message")
|
92 |
tts_output2 = gr.Audio(label="Output Audio")
|
93 |
+
tts_submit.click(tts_fn, tts_input1, [tts_output1, tts_output2])
|
94 |
|
95 |
app.launch()
|