Skip to content
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

Advanced example: sounddevice streaming #1562

Open
bmcfee opened this issue Aug 29, 2022 · 3 comments
Open

Advanced example: sounddevice streaming #1562

bmcfee opened this issue Aug 29, 2022 · 3 comments
Labels
documentation Issues relating to docstrings, examples, and documentation build
Milestone

Comments

@bmcfee
Copy link
Member

bmcfee commented Aug 29, 2022

Is your feature request related to a problem? Please describe.

We somewhat often get questions about how to use librosa for stream-based processing of a live audio capture. The "PCEN Streaming" example gets us part of the way there, but it uses soundfile's block streaming mode and not a live device.

Describe the solution you'd like
We could add an example using the sounddevice package to do a frame- or block-based processing example with callbacks or asyncio.

The main challenge in setting this up would be getting the documentation to build consistently offline. I wonder if there's a way that we could mock this in the documentation build to simulate having a live device?

As a stretch goal, it would be great if the example could generate an animated display.

@bmcfee bmcfee added the documentation Issues relating to docstrings, examples, and documentation build label Aug 29, 2022
@bmcfee bmcfee added this to the 0.10.0 milestone Aug 29, 2022
@bmcfee
Copy link
Member Author

bmcfee commented Aug 29, 2022

https://sphinx-gallery.github.io/stable/auto_examples/plot_8_animations.html#sphx-glr-auto-examples-plot-8-animations-py shows how to do animations in general.

@bmcfee
Copy link
Member Author

bmcfee commented Aug 31, 2022

spatialaudio/python-sounddevice#431 has some ideas for how to arrange a virtual device via jack

@bmcfee bmcfee removed this from the 0.10.0 milestone Sep 28, 2022
@bmcfee
Copy link
Member Author

bmcfee commented Jun 1, 2023

Looking back upon this today, it seems that the sounddevice folks have examples for stream-processing from ffmpeg output, which I think should do the trick nicely for us.

https://python-sounddevice.readthedocs.io/en/0.4.6/examples.html#play-a-web-stream

@bmcfee bmcfee added this to the 0.10.1 milestone Jun 1, 2023
@bmcfee bmcfee modified the milestones: 0.10.1, 0.10.2 Aug 15, 2023
@bmcfee bmcfee modified the milestones: 0.10.2, 1.0.0 Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues relating to docstrings, examples, and documentation build
Development

No branches or pull requests

1 participant