Spaces:
Build error
Build error
Update inference.py
Browse files- 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'])
|