Spaces:
Paused
Paused
Increase max audio length from 20 seconds to 60
Browse files47 unmodified lines4849505152515253545554 unmodified lines11011111211311311411511647 unmodified lines return "You need to upload an audio", None sampling_rate, audio = input_audio duration = audio.shape[0] / sampling_rate if duration > 20 and limitation: return "Please upload an audio file that is less than 20 seconds. If you need to generate a longer audio file, please use Colab.", None if duration > 60 and limitation: return "Please upload an audio file that is less than 60 seconds. If you need to generate a longer audio file, please use Colab.", None audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32) if len(audio.shape) > 1: audio = librosa.to_mono(audio.transpose(1, 0))54 unmodified lines ) with gr.Row(): with gr.Column(): vc_input = gr.Audio(label="Input audio"+' (less than 20 seconds)' if limitation else '') vc_input = gr.Audio(label="Input audio"+' (less than 60 seconds)' if limitation else '') vc_transform = gr.Number(label="vc_transform", value=0) auto_f0 = gr.Checkbox(label="auto_f0", value=False) tts_mode = gr.Checkbox(label="tts (use edge-tts as input)", value=False)app.py+3-3