Skip to content

Instantly share code, notes, and snippets.

@fijimunkii
Forked from alanb1501/starwars.sh
Last active August 30, 2015 22:46
Show Gist options
  • Select an option

  • Save fijimunkii/27c6235431e195b29fde to your computer and use it in GitHub Desktop.

Select an option

Save fijimunkii/27c6235431e195b29fde 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