Spaces:
Running
Running
kevinwang676
commited on
Commit
•
6efb401
1
Parent(s):
b2572c6
Update app.py
Browse files
app.py
CHANGED
@@ -64,8 +64,8 @@ def create_vc_fn(model_title, tgt_sr, net_g, vc, if_f0, version, file_index):
|
|
64 |
return "You need to upload an audio", None
|
65 |
sampling_rate, audio = vc_upload
|
66 |
duration = audio.shape[0] / sampling_rate
|
67 |
-
if duration >
|
68 |
-
return "Please upload an audio file that is less than
|
69 |
audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
|
70 |
if len(audio.shape) > 1:
|
71 |
audio = librosa.to_mono(audio.transpose(1, 0))
|
|
|
64 |
return "You need to upload an audio", None
|
65 |
sampling_rate, audio = vc_upload
|
66 |
duration = audio.shape[0] / sampling_rate
|
67 |
+
if duration > 600 and limitation:
|
68 |
+
return "Please upload an audio file that is less than 10 minutes. If you need to generate a longer audio file, please use Colab.", None
|
69 |
audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
|
70 |
if len(audio.shape) > 1:
|
71 |
audio = librosa.to_mono(audio.transpose(1, 0))
|