# Processing audio streams in Julia

**URL:** <https://discourse.julialang.org/t/processing-audio-streams-in-julia/41957>\
**Category:** General Usage\
**Created:** [June 23, 2020, 9:31pm UTC](https://discourse.julialang.org/t/processing-audio-streams-in-julia/41957 "2020-06-23T21:31:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phil\_Tomson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/phil_tomson/32/3575_2.png) [@Phil\_Tomson](https://discourse.julialang.org/u/Phil_Tomson)\
**Post date:** [June 23, 2020, 9:31pm UTC](https://discourse.julialang.org/t/processing-audio-streams-in-julia/41957/1 "2020-06-23T21:31:05Z")

</div>

I’m looking for a way to process audio streams in Julia. Specifically I’d like to be able to open up a stream from web radio stations and do some machine learning on the data stream.

It looks like AudioIO.jl used to be the way this was done, but it’s deprecated. There’s MusicProcessing.jl but it appears to also be deprecated (there’s a note on an issue saying it probably won’t work with Julia 1.0+). There’s PortAudio.jl, but it also seems not to work with Julia 1.0+. Then again, I’m not sure that any of those would actually work with audio streamed over the internet.

---

<div class="post-metadata">

**Author:** ![contradict](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@contradict](https://discourse.julialang.org/u/contradict)\
**Post date:** [June 24, 2020, 4:42pm UTC](https://discourse.julialang.org/t/processing-audio-streams-in-julia/41957/2 "2020-06-24T16:42:17Z")

</div>

PortAudio.jl hasn’t had a release in a long time, but if you install from master with `add https://github.com/JuliaAudio/PortAudio.jl`, it does seem to work. Unfortunately, on Linux, it expects to directly access the ALSA devices, so if you have Pulseaudio installed by your distribution you will have to disable that and give exclusive control of the hardware to PortAudio.

[WAV.jl](https://github.com/dancasimiro/WAV.jl) has a wrapper for Pulseaudio inside it, but it would need some work or real-time processing.
