Skip to content

gr.Audio should start from the begining when a new audio is written to the component #13273

@MohamedAliRashad

Description

@MohamedAliRashad

Describe the bug

I am using gradio==6.5.1 and for some reason when there is an audio playing in the component and then i click on something to change this audio clip with another the player state doesn't default to start from the begining, it stays in where it was before the change of audio.

This should be solved or at least have an option to disable or enable the state perservation of the player.

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr

Screenshot

No response

Logs

System Info

Gradio Environment Information:
------------------------------
Operating System: Linux
gradio version: 6.5.1
gradio_client version: 2.0.3

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

aiofiles: 24.1.0
anyio: 4.9.0
audioop-lts: 0.2.1
brotli: 1.2.0
fastapi: 0.135.2
ffmpy: 0.6.0
gradio-client: 2.0.3
groovy: 0.1.2
httpx: 0.28.1
huggingface-hub: 0.36.2
jinja2: 3.1.6
markupsafe: 3.0.2
numpy: 2.1.3
orjson: 3.10.18
packaging: 24.2
pandas: 2.3.0
pillow: 11.0.0
pydantic: 2.12.5
pydub: 0.25.1
python-multipart: 0.0.20
pytz: 2025.2
pyyaml: 6.0.2
safehttpx: 0.1.7
semantic-version: 2.10.0
starlette: 0.52.1
tomlkit: 0.13.3
typer: 0.16.0
typing-extensions: 4.14.1
uvicorn: 0.34.3
mcp is not installed.
pydantic: 2.12.5
authlib is not installed.
itsdangerous: 2.2.0


gradio_client dependencies in your environment:

fsspec: 2024.6.1
httpx: 0.28.1
huggingface-hub: 0.36.2
packaging: 24.2
typing-extensions: 4.14.1

Severity

Blocking usage of gradio

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions