Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -91,8 +91,8 @@ def create_vc_fn(model_name, tgt_sr, net_g, vc, if_f0, version, file_index):
|
|
91 |
return "You need to upload an audio", None
|
92 |
sampling_rate, audio = vc_upload
|
93 |
duration = audio.shape[0] / sampling_rate
|
94 |
-
if duration >
|
95 |
-
return "Please upload an audio file that is less than
|
96 |
audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
|
97 |
if len(audio.shape) > 1:
|
98 |
audio = librosa.to_mono(audio.transpose(1, 0))
|
|
|
91 |
return "You need to upload an audio", None
|
92 |
sampling_rate, audio = vc_upload
|
93 |
duration = audio.shape[0] / sampling_rate
|
94 |
+
if duration > 90 and spaces:
|
95 |
+
return "Please upload an audio file that is less than 90 seconds. If you need to generate a longer audio file, please use Colab.", None
|
96 |
audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
|
97 |
if len(audio.shape) > 1:
|
98 |
audio = librosa.to_mono(audio.transpose(1, 0))
|