How to play any waveform's audio in julia language?

You may play audio with https://github.com/ssfrr/AudioIO.jl

And for write/read wav https://github.com/JuliaLang/Sound.jl/blob/master/src/Sound.jl

However at this time both modules are in early stage.


You can use WAV.jl to encode the data in a WAV file. You can install the package via the Julia package system:

Pkg.add("WAV")

Then, use the wavwrite function to create the file:

wavwrite(data, "example.wav", Fs=8000)

There is a function (wavplay) buried in the WAV source code repository to play audio too, but it only works on Linux. I am waiting for someone to contribute windows and mac versions before I include it as part of an official version.


I'm a bit late here, but I also found this page, which might be of use as well. It documents a series of libraries for dealing with hardware in Julia, and contains a surprisingly lengthy list for audio/video stuff.

Tags:

Julia