amin2809 commited on
Commit
b70bb80
1 Parent(s): 7d71797

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -46,8 +46,8 @@ def create_vc_fn(tgt_sr, net_g, vc, if_f0, file_index, file_big_npy):
46
  return "You need to upload an audio", None
47
  sampling_rate, audio = input_audio
48
  duration = audio.shape[0] / sampling_rate
49
- if duration > 20 and limitation:
50
- 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
51
  audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
52
  if len(audio.shape) > 1:
53
  audio = librosa.to_mono(audio.transpose(1, 0))
 
46
  return "You need to upload an audio", None
47
  sampling_rate, audio = input_audio
48
  duration = audio.shape[0] / sampling_rate
49
+ if duration > 60 and limitation:
50
+ return "Please upload an audio file that is less than 2000 seconds. If you need to generate a longer audio file, please use Colab.", None
51
  audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
52
  if len(audio.shape) > 1:
53
  audio = librosa.to_mono(audio.transpose(1, 0))