Spaces:
Runtime error
Runtime error
Commit
·
f00ac14
1
Parent(s):
a1a0762
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,8 +33,8 @@ def create_vc_fn(model, sid):
|
|
| 33 |
sampling_rate, audio = input_audio
|
| 34 |
# print(audio.shape,sampling_rate)
|
| 35 |
duration = audio.shape[0] / sampling_rate
|
| 36 |
-
if duration >
|
| 37 |
-
return "Please upload an audio file that is less than
|
| 38 |
audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
|
| 39 |
if len(audio.shape) > 1:
|
| 40 |
audio = librosa.to_mono(audio.transpose(1, 0))
|
|
|
|
| 33 |
sampling_rate, audio = input_audio
|
| 34 |
# print(audio.shape,sampling_rate)
|
| 35 |
duration = audio.shape[0] / sampling_rate
|
| 36 |
+
if duration > 120 and limitation:
|
| 37 |
+
return "Please upload an audio file that is less than 120 seconds. If you need to generate a longer audio file, please use Colab.", None
|
| 38 |
audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
|
| 39 |
if len(audio.shape) > 1:
|
| 40 |
audio = librosa.to_mono(audio.transpose(1, 0))
|