Skip to content

Instantly share code, notes, and snippets.

@leifulstrup
Created September 13, 2017 19:24
Show Gist options
  • Save leifulstrup/c2d11e201112b98294bccdd09b5b7fb7 to your computer and use it in GitHub Desktop.
Save leifulstrup/c2d11e201112b98294bccdd09b5b7fb7 to your computer and use it in GitHub Desktop.
Simple OSX Python function to communicate alert via Mac text to speech capability - useful when waiting for long data processing to finish
import os
def alertMe(phrase):
text2speak = 'say ' + '"' + phrase + '"'
os.system(text2speak)
alertMe("Alert Me Function Works")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment