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
31.18k stars 2.33k forks source link

Interface crashes with MP3 file for audio #7378

Open jjshoots opened 5 months ago

jjshoots commented 5 months ago

Describe the bug

The interface crashes with a SIGILL for longer MP3 files, it works for WAV files (which, of the same length, are like 10x the filesize).

I'm using the Brave Browser v1.62.162.

The audio file in question (this link doesn't immediately download the file): http://jjshoots.ddns.net:8090/share/0ikEkQG0

Have you searched existing issues? πŸ”Ž

Reproduction

import gradio as gr

with gr.Blocks() as app:
    audio = gr.Audio(value="AUDIO_FILE_HERE", interactive=False, autoplay=False)

app.launch()

Screenshot

image

Logs

No response

System Info

Gradio Environment Information:
------------------------------
Operating System: Linux
gradio version: 4.17.0
gradio_client version: 0.9.0

------------------------------------------------
gradio dependencies in your environment:

aiofiles: 23.2.1
altair: 5.1.2
fastapi: 0.104.1
ffmpy: 0.3.1
gradio-client==0.9.0 is not installed.
httpx: 0.25.1
huggingface-hub: 0.20.3
importlib-resources: 6.1.1
jinja2: 3.1.2
markupsafe: 2.1.3
matplotlib: 3.8.1
numpy: 1.26.2
orjson: 3.9.10
packaging: 23.2
pandas: 2.1.3
pillow: 10.1.0
pydantic: 2.5.0
pydub: 0.25.1
python-multipart: 0.0.6
pyyaml: 6.0.1
ruff: 0.2.1
semantic-version: 2.10.0
tomlkit==0.12.0 is not installed.
typer: 0.9.0
typing-extensions: 4.8.0
uvicorn: 0.24.0.post1
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.

gradio_client dependencies in your environment:

fsspec: 2023.10.0
httpx: 0.25.1
huggingface-hub: 0.20.3
packaging: 23.2
typing-extensions: 4.8.0
websockets: 11.0.3

Severity

I can work around it

abidlabs commented 5 months ago

Is still an issue with the latest version of gradio?

jjshoots commented 5 months ago

@abidlabs Just tried it, yes. Going to update the issue with the new version.

thiswillbeyourgithub commented 5 months ago

I think I'm encountering the same issue. I noticed that after hitting stop recording my bandwidth meter displays incredibly high bandwidth like 4Mi up AND down. So I don't know if that's relevant or if my metering is flawed but I wouldn't be surprised if there were some sort of infinite loop that sends the file over and over or something. And 4Mi is only for something like 3s of audios.

SamridhiVaid commented 2 months ago

Hi @jjshoots were you able to solve this? I am getting the same issue in version 4.29.0. When I record a longer audio my gradio application hangs and returns the

Aw, snap!! error
jjshoots commented 2 months ago

Nope, not solved. I just use m4a files instead. They're much bigger in size so it eats up bandwidth but doesn't crash.

SamridhiVaid commented 2 months ago

Nope, not solved. I just use m4a files instead. They're much bigger in size so it eats up bandwidth but doesn't crash.

I am using microphone as a source. Should I just change the format to m4a then? @jjshoots

jjshoots commented 2 months ago

Yea either m4a or wav works.