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
34.26k stars 2.6k forks source link

Audio is not working #9480

Open Hernandezjuand opened 2 months ago

Hernandezjuand commented 2 months 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 2 months ago

Looks like a lite issue? @aliabd @whitphx

abidlabs commented 2 months 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 months ago

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

whitphx commented 1 month ago

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

whitphx commented 1 month 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 1 month 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 1 month 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