I have a small Python library for audio experimentation, and currently the library writes raw wave data to the disk, which I can then feed into something like afplay
to play the sound.
I'm curious, however, if I can play audio right from memory. I tried creating a named pipe (since afplay
requires a filename as it's first argument), but unfortunately it is throwing the error Error: AudioFileOpen failed ('typ?')
.
Is there an easy way to stream audio from a named pipe? Is there a better way to accomplish what I am trying to do?