Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -81,7 +81,7 @@ 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 >
|
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:
|
|
|
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 > 60 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:
|