Plachta commited on
Commit
9b9ae6e
β€’
1 Parent(s): 566881a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -56,9 +56,9 @@ def infer(text, character, language):
56
  char_id = int(character.split(':')[0])
57
  stn_tst = get_text(text, hps)
58
  with torch.no_grad():
59
- x_tst = stn_tst.cuda().unsqueeze(0)
60
- x_tst_lengths = torch.LongTensor([stn_tst.size(0)]).cuda()
61
- sid = torch.LongTensor([char_id]).cuda()
62
  audio = net_g.infer(x_tst, x_tst_lengths, sid=sid, noise_scale=.667, noise_scale_w=0.8, length_scale=1)[0][0,0].data.cpu().float().numpy()
63
  return (text,(22050, audio))
64
 
 
56
  char_id = int(character.split(':')[0])
57
  stn_tst = get_text(text, hps)
58
  with torch.no_grad():
59
+ x_tst = stn_tst.unsqueeze(0)
60
+ x_tst_lengths = torch.LongTensor([stn_tst.size(0)])
61
+ sid = torch.LongTensor([char_id])
62
  audio = net_g.infer(x_tst, x_tst_lengths, sid=sid, noise_scale=.667, noise_scale_w=0.8, length_scale=1)[0][0,0].data.cpu().float().numpy()
63
  return (text,(22050, audio))
64