Spaces:
Runtime error
Runtime error
kevinwang676
commited on
Commit
•
258b9e3
1
Parent(s):
6917010
Update app.py
Browse files
app.py
CHANGED
@@ -45,8 +45,8 @@ def create_vc_fn(tgt_sr, net_g, vc, if_f0, file_index):
|
|
45 |
return "You need to upload an audio", None
|
46 |
sampling_rate, audio = input_audio
|
47 |
duration = audio.shape[0] / sampling_rate
|
48 |
-
if duration >
|
49 |
-
return "Please upload an audio file that is less than
|
50 |
audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
|
51 |
if len(audio.shape) > 1:
|
52 |
audio = librosa.to_mono(audio.transpose(1, 0))
|
|
|
45 |
return "You need to upload an audio", None
|
46 |
sampling_rate, audio = input_audio
|
47 |
duration = audio.shape[0] / sampling_rate
|
48 |
+
if duration > 200 and limitation:
|
49 |
+
return "Please upload an audio file that is less than 200 seconds. If you need to generate a longer audio file, please use Colab.", None
|
50 |
audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
|
51 |
if len(audio.shape) > 1:
|
52 |
audio = librosa.to_mono(audio.transpose(1, 0))
|