In Ubuntu, I can use aplay to play real-time generated sound from a script, passing the output of my script to aplay stdin:
./generate_sound.py | aplay -r 2000 -c2 -f MU_LAW cat sample.wav | aplay
Is there a way to do the same from a terminal in OSX? I think afplay does not support this ...
Maybe someone knows another OSX command line audio player that would do the trick?
source share