Nick1 commited on
Commit
ff0b9ea
1 Parent(s): ca7bbb9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -91,8 +91,8 @@ def create_vc_fn(model_name, tgt_sr, net_g, vc, if_f0, version, file_index):
91
  return "You need to upload an audio", None
92
  sampling_rate, audio = vc_upload
93
  duration = audio.shape[0] / sampling_rate
94
- if duration > 20 and spaces:
95
- return "Please upload an audio file that is less than 20 seconds. If you need to generate a longer audio file, please use Colab.", None
96
  audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
97
  if len(audio.shape) > 1:
98
  audio = librosa.to_mono(audio.transpose(1, 0))
 
91
  return "You need to upload an audio", None
92
  sampling_rate, audio = vc_upload
93
  duration = audio.shape[0] / sampling_rate
94
+ if duration > 90 and spaces:
95
+ return "Please upload an audio file that is less than 90 seconds. If you need to generate a longer audio file, please use Colab.", None
96
  audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
97
  if len(audio.shape) > 1:
98
  audio = librosa.to_mono(audio.transpose(1, 0))