1#!/usr/bin/env python
2
3import sys
4import pyttsx
5
6def main():
7 print 'running speech-text.py...'
8 engine = pyttsx.init()
9 str = "Hi..."
10 if len(sys.argv) > 1:
11 str = sys.argv[1]
12 engine.say(str)
13 engine.runAndWait()
14
15if __name__ == '__main__':
16 main()
17
1sudo chown root:root /usr/bin/speech-test.py
2sudo chmod 4755 /usr/bin/speech-test.py
3