gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
33.34k stars 2.52k forks source link

Audio is not working #9480

Open Hernandezjuand opened 3 weeks ago

Hernandezjuand commented 3 weeks ago

Describe the bug

Always show errror, even the test one. Screenshot 2024-09-30 113100

Have you searched existing issues? 🔎

Reproduction

import numpy as np

import gradio as gr

def reverse_audio(audio): sr, data = audio return (sr, np.flipud(data))

input_audio = gr.Audio( sources=["microphone"], waveform_options=gr.WaveformOptions( waveform_color="#01C6FF", waveform_progress_color="#0066B4", skip_length=2, show_controls=False, ), ) demo = gr.Interface( fn=reverse_audio, inputs=input_audio, outputs="audio" )

if name == "main": demo.launch()

Screenshot

{66CAF9EF-1B3F-4C76-9501-2E6049F93B12}

Logs

No response

System Info

https://www.gradio.app/main/docs/gradio/audio#demos

Severity

I can work around it

freddyaboulton commented 3 weeks ago

Looks like a lite issue? @aliabd @whitphx

abidlabs commented 2 weeks ago

Hi @e8035669, this has been fixed in the v5 version of Lite, which should be out next week. In the meantime, you can take a look here

abidlabs commented 2 weeks ago

Btw Cloudflare is triggering a phishing alert, but its a false alert

whitphx commented 2 weeks ago

Found this bug still exists in 5.0. Reopen this to track it

whitphx commented 2 weeks ago

@abidlabs @freddyaboulton This is a bug on Dropdown existing even on normal Gradio where the initial value is set as [] even though multiselect=False so the sample app above goes to the error if submitted with the default selection. Will push a fix.

abidlabs commented 2 weeks ago

@whitphx can you provide a repro? The demo in the original comment does not use a Dropdown, maybe I'm missing something?

whitphx commented 2 weeks ago

@abidlabs oops sorry I tested it on the tone sample in the playground and happened to find another problem -> https://github.com/gradio-app/gradio/pull/9526. This issue itself has a different cause and will also fix that. -> https://github.com/gradio-app/gradio/issues/6000