Skip to content

Enable streaming audio output in the 4.0 client #6282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
freddyaboulton opened this issue Nov 3, 2023 · 4 comments
Closed
1 task done

Enable streaming audio output in the 4.0 client #6282

freddyaboulton opened this issue Nov 3, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@freddyaboulton
Copy link
Collaborator

Describe the bug

The 4.0-compatible gradio client does not support streaming output

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

run streaming_audio_out demo from within that directory

from gradio_client import Client

client = Client("http://127.0.0.1:7860")
res = client.predict("./audio/cantina.wav", "mp3", api_name="/stream_file")

Screenshot

No response

Logs

432 temp_dir.mkdir(exist_ok=True, parents=True)
    434 with requests.get(url_path, headers=headers, stream=True) as r:
--> 435     r.raise_for_status()
    436     with open(temp_dir / Path(url_path).name, "wb") as f:
    437         for chunk in r.iter_content(chunk_size=128 * sha1.block_size):
HTTPError: 403 Client Error: Forbidden for url: http://127.0.0.1:7860/file=37696df7-4898-4a67-99e1-7280bb31b29d/5363134224/6

System Info

Gradio Environment Information:
------------------------------
Operating System: Darwin
gradio version: 4.0.2
gradio_client version: 0.7.0

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

aiofiles: 23.2.1
altair: 4.2.0
fastapi: 0.101.0
ffmpy: 0.3.1
gradio-client==0.7.0 is not installed.
httpx: 0.23.0
huggingface-hub: 0.18.0
importlib-resources: 6.0.1
jinja2: 3.1.2
markupsafe: 2.1.1
matplotlib: 3.7.2
numpy: 1.26.0
orjson: 3.9.4
packaging: 22.0
pandas: 1.5.3
pillow: 9.2.0
pydantic: 2.4.0
pydub: 0.25.1
python-multipart: 0.0.6
pyyaml: 6.0
requests: 2.28.1
semantic-version: 2.10.0
tomlkit==0.12.0 is not installed.
typer: 0.9.0
typing-extensions: 4.8.0
uvicorn: 0.23.2
websockets: 11.0.3
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.


gradio_client dependencies in your environment:

fsspec: 2023.6.0
httpx: 0.23.0
huggingface-hub: 0.18.0
packaging: 22.0
requests: 2.28.1
typing-extensions: 4.8.0
websockets: 11.0.3

Severity

I can work around it

@freddyaboulton freddyaboulton added the bug Something isn't working label Nov 3, 2023
@aliabid94 aliabid94 self-assigned this Nov 6, 2023
@abidlabs abidlabs added the Regression Bugs did not exist in previous versions of Gradio label Nov 12, 2023
@pseudotensor
Copy link
Contributor

pseudotensor commented Nov 27, 2023

Yes, I have same issue. I can't upgrade to gradio4 as-is, so for me it blocks all usage.

@pseudotensor
Copy link
Contributor

@aliabid94 I see you assigned yourself. When can this be fixed?

I spent several days upgrading to gradio4 and this is a major blocker for me.

Thanks!

@abidlabs abidlabs added the Priority High priority issues label Jan 29, 2024
@abidlabs abidlabs removed Priority High priority issues Regression Bugs did not exist in previous versions of Gradio labels Jul 31, 2024
@Gauntlet173
Copy link

I also have this problem. Did anyone find a workaround they can share?

@abidlabs
Copy link
Member

Should be fixed in the latest version of the Client!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants