guo commited on
Commit
eab320e
·
1 Parent(s): b4e281c
Files changed (1) hide show
  1. inference.py +2 -2
inference.py CHANGED
@@ -65,8 +65,8 @@ def infer(f,r,speaker,key,reqf0=False):
65
  return "采样率过低,请上传至少拥有16000Hz采样率的音频",None
66
  duration = audio.shape[0] / sr
67
  print(audio,sr,duration)
68
- if duration > 120:
69
- return "请上传小于2min的音频", None
70
  #audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
71
  x,sourcef0 = get_text(audio,sr,getkey(key))
72
  x_lengths = [np.size(x,1)]
 
65
  return "采样率过低,请上传至少拥有16000Hz采样率的音频",None
66
  duration = audio.shape[0] / sr
67
  print(audio,sr,duration)
68
+ #if duration > 120:
69
+ #return "请上传小于2min的音频", None
70
  #audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
71
  x,sourcef0 = get_text(audio,sr,getkey(key))
72
  x_lengths = [np.size(x,1)]