kevinwang676 commited on
Commit
0e4f43a
1 Parent(s): 258b9e3

Update app.py

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