Created
May 15, 2014 20:21
-
-
Save awentzonline/a7d9a2a6adc0f49257bf to your computer and use it in GitHub Desktop.
robotalk.py: for spoken communication after the singularity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import subprocess | |
| import sys | |
| if __name__ == '__main__': | |
| """ | |
| Example: robotalk.py "Please do not violate me, robot." | |
| """ | |
| text = sys.argv[-1] | |
| s = ' '.join([' '.join(bin(ord(x))[2:]) for x in text]) | |
| subprocess.call(['say', s]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment