Nick1 commited on
Commit
47996f6
·
1 Parent(s): 8495689

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -81,8 +81,8 @@ def create_vc_fn(model_name, tgt_sr, net_g, vc, if_f0, version, file_index):
81
  return "You need to upload an audio", None
82
  sampling_rate, audio = vc_upload
83
  duration = audio.shape[0] / sampling_rate
84
- if duration > 20 and spaces:
85
- 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
86
  audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
87
  if len(audio.shape) > 1:
88
  audio = librosa.to_mono(audio.transpose(1, 0))
 
81
  return "You need to upload an audio", None
82
  sampling_rate, audio = vc_upload
83
  duration = audio.shape[0] / sampling_rate
84
+ if duration > 300 and spaces:
85
+ return "Please upload an audio file that is less than 300 seconds. If you need to generate a longer audio file, please use Colab.", None
86
  audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
87
  if len(audio.shape) > 1:
88
  audio = librosa.to_mono(audio.transpose(1, 0))