-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Audio Component Streaming Behaviour is weird? #7742
Comments
did you end up finding a solution to this? |
Unfortunately not… |
@s-kruschel what work around did you find in the meantime? @abidlabs it would be awesome if there was an audio-streaming example similar to this https://www.gradio.app/guides/streaming-outputs |
@pablovela5620 - we have a draft guide for audio streaming that will be published in 5.0. Feedback welcome as we're still tweaking the implementation https://gradio-d8zf06g8v-hugging-face.vercel.app/main/guides/streaming-outputs#streaming-media |
Beautiful! Ya'll were already thinking about this, I'll take a read |
@freddyaboulton having more verbose explicit examples help a lot with getting things right from the get-go (even if they may be overly verbose at times) |
Hi @pablovela5620 - You just need to return the next chunk of bytes (or a file containing the next chunks). I've prepared this example using Parler TTS: https://huggingface.co/spaces/gradio/magic-8-ball It's added in this PR which adds more guides for streaming (#9173) |
@freddyaboulton you are awesome, this is exactly what I was looking for. Thank you |
Describe the bug
Hey folks,
I've searched for similar issues, and there are several gradio Audio component issues. So I'm not sure if they report the same problems.
What I'm trying to do is to stream the TTS OpenAI API response. The OpenAI part is working. However, I do not get the Audio component behaviour.
What I've tried:
Further, only
out = gr.Audio(autoplay=True)
seems to work.out = gr.Audio(autoplay=True, streaming=True)
does not work and it just does nothing for whatever reason.Actually, the optimal solution in my opinion would be, if "streaming=True" is set and one appends the incoming chunks to the already existing chunks, that the audio component does not always restart to play.
Have you searched existing issues? 🔎
Reproduction
Screenshot
No response
Logs
No response
System Info
Severity
I can work around it
The text was updated successfully, but these errors were encountered: