Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -63,9 +63,9 @@ def create_tts_fn(model, hps, speaker_ids):
|
|
63 |
speaker_id = speaker_ids[speaker]
|
64 |
stn_tst = get_text(text, hps, is_symbol)
|
65 |
with no_grad():
|
66 |
-
x_tst = stn_tst.unsqueeze(0)
|
67 |
-
x_tst_lengths = LongTensor([stn_tst.size(0)])
|
68 |
-
sid = LongTensor([speaker_id])
|
69 |
audio = model.infer(x_tst, x_tst_lengths, sid=sid, noise_scale=.667, noise_scale_w=0.8,
|
70 |
length_scale=1.0 / speed)[0][0, 0].data.cpu().float().numpy()
|
71 |
del stn_tst, x_tst, x_tst_lengths, sid
|
|
|
63 |
speaker_id = speaker_ids[speaker]
|
64 |
stn_tst = get_text(text, hps, is_symbol)
|
65 |
with no_grad():
|
66 |
+
x_tst = stn_tst.unsqueeze(0)
|
67 |
+
x_tst_lengths = LongTensor([stn_tst.size(0)])
|
68 |
+
sid = LongTensor([speaker_id])
|
69 |
audio = model.infer(x_tst, x_tst_lengths, sid=sid, noise_scale=.667, noise_scale_w=0.8,
|
70 |
length_scale=1.0 / speed)[0][0, 0].data.cpu().float().numpy()
|
71 |
del stn_tst, x_tst, x_tst_lengths, sid
|