Skip to content

Instantly share code, notes, and snippets.

@awentzonline
Created May 15, 2014 20:21
Show Gist options
  • Select an option

  • Save awentzonline/a7d9a2a6adc0f49257bf to your computer and use it in GitHub Desktop.

Select an option

Save awentzonline/a7d9a2a6adc0f49257bf to your computer and use it in GitHub Desktop.
robotalk.py: for spoken communication after the singularity
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