Capturing audio input from microphone, with Haskell?

easily capture microphone input and, perhaps, play various audio files as well..

It will strongly depend on your OS platform: there are standard C libraries for this functionality on each OS, and you'll be looking for Haskell bindings to them (e.g. PulseAudio, etc). Look in the Sound category on Hackage:

  • http://hackage.haskell.org/packages/archive/pkg-list.html#cat:sound

E.g. HSndFile for audio file writing, http://hackage.haskell.org/package/HSoundFile


the module pulse-simple exposes bindings to capture sound from the microphone, see the second example at the top of the page;
https://hackage.haskell.org/package/pulse-simple-0.1.13/docs/Sound-Pulse-Simple.html
pulse audio libraries required by cabal are obtainable via cygwin (search "pulse" in the cygwin installer).

there is a also binding to sox, which looks promising. https://hackage.haskell.org/package/sox

im sure there are other api wrappers to be found in hackage sound category.

for linux there is a binding to jack, has "unix" as a dependency, it WILL NOT build on windows...

Tags:

Io

Audio

Haskell