Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -38,8 +38,8 @@ filename = 'test' #@param {type: "string"}
|
|
38 |
audio_path = f'/content/VITS-Aatrox/{filename}.wav'
|
39 |
stn_tst = get_text(text, hps)
|
40 |
with torch.no_grad():
|
41 |
-
x_tst = stn_tst.
|
42 |
-
x_tst_lengths = torch.LongTensor([stn_tst.size(0)])
|
43 |
audio = net_g.infer(x_tst, x_tst_lengths, noise_scale=.667, noise_scale_w=0.8, length_scale=length_scale)[0][0,0].data.cpu().float().numpy()
|
44 |
ipd.display(ipd.Audio(audio, rate=hps.data.sampling_rate))
|
45 |
|
|
|
38 |
audio_path = f'/content/VITS-Aatrox/{filename}.wav'
|
39 |
stn_tst = get_text(text, hps)
|
40 |
with torch.no_grad():
|
41 |
+
x_tst = stn_tst.unsqueeze(0)
|
42 |
+
x_tst_lengths = torch.LongTensor([stn_tst.size(0)])
|
43 |
audio = net_g.infer(x_tst, x_tst_lengths, noise_scale=.667, noise_scale_w=0.8, length_scale=length_scale)[0][0,0].data.cpu().float().numpy()
|
44 |
ipd.display(ipd.Audio(audio, rate=hps.data.sampling_rate))
|
45 |
|