Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save combatwombat/1869b908c8f78b6778d1646b97583fa3 to your computer and use it in GitHub Desktop.
Save combatwombat/1869b908c8f78b6778d1646b97583fa3 to your computer and use it in GitHub Desktop.
sing happy birthday
osascript -e 'set currentUser to long user name of (get system info)' -e 'set firstName to first word of currentUser' -e 'set lastName to last word of currentUser' -e 'set noteValues to {56, 56, 58, 56, 61, 60, 50, 56, 56, 58, 56, 63, 61, 50, 56, 56, 68, 65, 61, 60, 58, 50, 66, 66, 65, 61, 63, 61}' -e 'set syllables to {"hap", "p", "birth", "day", "to", "you", "[[slnc 500]]", "hap", "p", "birth", "day", "to", "you", "[[slnc 500]]", "hap", "p", "birth", "day", "dear", firstName, lastName, "[[slnc 500]]", "hap", "p", "birth", "day", "to", "you"}' -e 'repeat with i from 1 to the length of noteValues' -e 'set thisValue to item i of noteValues' -e 'set thisSyllable to item i of syllables' -e 'if length of thisSyllable is less than 3 then' -e 'set speakingRate to 220' -e 'else' -e 'set speakingRate to 100' -e 'end if' -e 'say thisSyllable pitch thisValue using "Alex" speaking rate speakingRate modulation 0' -e 'end repeat'
@combatwombat
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment