EDGAhab commited on
Commit
a18c90f
·
1 Parent(s): 0e56d55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -17,7 +17,7 @@ def get_text(text, hps):
17
  return text_norm
18
 
19
 
20
- hps = utils.get_hparams_from_file("configs/config.json")
21
 
22
  net_g = SynthesizerTrn(
23
  len(symbols),
@@ -27,7 +27,7 @@ net_g = SynthesizerTrn(
27
  _ = net_g.eval()
28
 
29
  # _ = utils.load_checkpoint("logs/woman_csmsc/G_100000.pth", net_g, None)
30
- _ = utils.load_checkpoint("G_98000.pth", net_g, None)
31
 
32
  def vc_fn(input):
33
  stn_tst = get_text(input, hps)
@@ -39,7 +39,7 @@ def vc_fn(input):
39
  # x_tst_lengths = torch.LongTensor([stn_tst.size(0)]).cpu()
40
 
41
  audio = net_g.infer(x_tst, x_tst_lengths, noise_scale=.667, noise_scale_w=0.8, length_scale=1)[0][0,0].data.cpu().float().numpy()
42
- sampling_rate = 44100
43
  return (sampling_rate, audio)
44
 
45
  app = gr.Blocks()
 
17
  return text_norm
18
 
19
 
20
+ hps = utils.get_hparams_from_file("configs/biaobei_base.json")
21
 
22
  net_g = SynthesizerTrn(
23
  len(symbols),
 
27
  _ = net_g.eval()
28
 
29
  # _ = utils.load_checkpoint("logs/woman_csmsc/G_100000.pth", net_g, None)
30
+ _ = utils.load_checkpoint("G_aatrox.pth", net_g, None)
31
 
32
  def vc_fn(input):
33
  stn_tst = get_text(input, hps)
 
39
  # x_tst_lengths = torch.LongTensor([stn_tst.size(0)]).cpu()
40
 
41
  audio = net_g.infer(x_tst, x_tst_lengths, noise_scale=.667, noise_scale_w=0.8, length_scale=1)[0][0,0].data.cpu().float().numpy()
42
+ sampling_rate = 22050
43
  return (sampling_rate, audio)
44
 
45
  app = gr.Blocks()