14-26AA commited on
Commit
fd5d333
1 Parent(s): 2c29a49

Update inference.py

Browse files
Files changed (1) hide show
  1. inference.py +1 -0
inference.py CHANGED
@@ -64,6 +64,7 @@ def infer(f,r,speaker,key,reqf0=False):
64
  if sr<16000:
65
  return "采样率过低,请上传至少拥有16000Hz采样率的音频",None
66
  duration = audio.shape[0] / sr
 
67
  if duration > 120:
68
  return "请上传小于2min的音频", None
69
  audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
 
64
  if sr<16000:
65
  return "采样率过低,请上传至少拥有16000Hz采样率的音频",None
66
  duration = audio.shape[0] / sr
67
+ print(audio.shape,sr,duration)
68
  if duration > 120:
69
  return "请上传小于2min的音频", None
70
  audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)