14-26AA commited on
Commit
8be4633
1 Parent(s): 800a97e

Update inference.py

Browse files
Files changed (1) hide show
  1. inference.py +1 -0
inference.py CHANGED
@@ -69,6 +69,7 @@ def infer(f,r,speaker,key,reqf0=False):
69
  audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
70
  x,sourcef0 = get_text(audio,sr,getkey(key))
71
  x_lengths = [np.size(x,1)]
 
72
  sid = [speaker]
73
  ort_inputs = {'x':x,'x_lengths':x_lengths,'sid':sid,"noise_scale":[0.667],"length_scale":[1.0],"noise_scale_w":[0.8]}
74
  infersession = onnxruntime.InferenceSession("onnxmodel334.onnx",providers=['CUDAExecutionProvider'])
 
69
  audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
70
  x,sourcef0 = get_text(audio,sr,getkey(key))
71
  x_lengths = [np.size(x,1)]
72
+ print(x_lengths[0],sr,speaker,key)
73
  sid = [speaker]
74
  ort_inputs = {'x':x,'x_lengths':x_lengths,'sid':sid,"noise_scale":[0.667],"length_scale":[1.0],"noise_scale_w":[0.8]}
75
  infersession = onnxruntime.InferenceSession("onnxmodel334.onnx",providers=['CUDAExecutionProvider'])