Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 >
|
50 |
-
return "Please upload an audio file that is less than
|
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))
|