Spaces:
Paused
Paused
Increase max audio length from 20 seconds to 60
Browse files47 unmodified lines484950515253545554 unmodified lines11011111211311411511647 unmodified linesreturn "You need to upload an audio", Nonesampling_rate, audio = input_audioduration = audio.shape[0] / sampling_rateif 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.", Noneaudio = (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_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)47 unmodified lines484950515253545554 unmodified lines11011111211311411511647 unmodified linesreturn "You need to upload an audio", Nonesampling_rate, audio = input_audioduration = audio.shape[0] / sampling_rateif 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.", Noneaudio = (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 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