SayaSS commited on
Commit
17b78ec
1 Parent(s): 26277ae
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -32,8 +32,8 @@ def create_vc_fn(model, sid):
32
  return "You need to upload an audio", None
33
  sampling_rate, audio = input_audio
34
  duration = audio.shape[0] / sampling_rate
35
- if duration > 45 and limitation:
36
- return "Please upload an audio file that is less than 45 seconds. If you need to generate a longer audio file, please use Colab.", None
37
  audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
38
  if len(audio.shape) > 1:
39
  audio = librosa.to_mono(audio.transpose(1, 0))
@@ -87,7 +87,7 @@ if __name__ == '__main__':
87
  )
88
  with gr.Row():
89
  with gr.Column():
90
- vc_input = gr.Audio(label="Input audio"+' (less than 10 seconds)' if limitation else '')
91
  vc_transform = gr.Number(label="vc_transform", value=0)
92
  auto_f0 = gr.Checkbox(label="auto_f0", value=False)
93
  vc_submit = gr.Button("Generate", variant="primary")
 
32
  return "You need to upload an audio", None
33
  sampling_rate, audio = input_audio
34
  duration = audio.shape[0] / sampling_rate
35
+ if duration > 20 and limitation:
36
+ 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
37
  audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
38
  if len(audio.shape) > 1:
39
  audio = librosa.to_mono(audio.transpose(1, 0))
 
87
  )
88
  with gr.Row():
89
  with gr.Column():
90
+ vc_input = gr.Audio(label="Input audio"+' (less than 20 seconds)' if limitation else '')
91
  vc_transform = gr.Number(label="vc_transform", value=0)
92
  auto_f0 = gr.Checkbox(label="auto_f0", value=False)
93
  vc_submit = gr.Button("Generate", variant="primary")