Created
October 19, 2016 10:16
-
-
Save kepsic/c4fc7e49fb4f8012c60791217360f699 to your computer and use it in GitHub Desktop.
This file contains 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
#!/urs/bin/env python | |
import pyttsx | |
import argparse | |
import time | |
import sys | |
engine = pyttsx.init() | |
def onEnd(name, completed): | |
sys.exit(0) | |
parser = argparse.ArgumentParser(description='text to speech') | |
parser.add_argument('text') | |
args = parser.parse_args() | |
engine = pyttsx.init() | |
engine.connect('finished-utterance', onEnd) | |
engine.say(args.text) | |
engine.runAndWait() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment