Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ def vc_fn(sid, input_audio, vc_transform, auto_f0,cluster_ratio, noise_scale):
|
|
24 |
sampling_rate, audio = input_audio
|
25 |
# print(audio.shape,sampling_rate)
|
26 |
duration = audio.shape[0] / sampling_rate
|
27 |
-
if duration >
|
28 |
return "请上传小于45s的音频,需要转换长音频请本地进行转换", None
|
29 |
audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
|
30 |
if len(audio.shape) > 1:
|
|
|
24 |
sampling_rate, audio = input_audio
|
25 |
# print(audio.shape,sampling_rate)
|
26 |
duration = audio.shape[0] / sampling_rate
|
27 |
+
if duration > 90:
|
28 |
return "请上传小于45s的音频,需要转换长音频请本地进行转换", None
|
29 |
audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
|
30 |
if len(audio.shape) > 1:
|