Tuesday, February 28, 2017

fun with sounds from the terminal

Someone at work praised Linux and posted this oneliner "white noise machine":
play -q -c 2 -n synth brownnoise band -n 1600 1500 tremolo .1 30

It can run on MacOS; play is part of sox which you can get via brew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"to install brew, then
brew install sox

It reminded me of the fun you can have with the 'say' command on Macs-- a lot of voices there, get a list by running 
say -v '?'
or better yet hear each one with this clever one-liner:
for voice in `say -v '?' | awk '{print $1}'`; do say -v "$voice" "Hello, my name is $voice."; done
(it only reads the first part of multiword voice name, but things still work.)

No comments:

Post a Comment