Skip to content

Instantly share code, notes, and snippets.

@alanb1501
Last active April 9, 2016 13:34
Show Gist options
  • Save alanb1501/6bf1c64594780836cfcd to your computer and use it in GitHub Desktop.
Save alanb1501/6bf1c64594780836cfcd to your computer and use it in GitHub Desktop.
Reads a random starwars quote in each voice available via the `say` command. (OS X only)
#!/usr/bin/env bash
for voice in $(say -v ? | perl -pe 's/^(.*?)\s.*$/$1/'); do quote=$(curl -s http://www.iheartquotes.com/api/v1/random?source=starwars | perl -pe 's/\[starwars.*?$//g'); echo $voice; say -v $voice $quote; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment