You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
442 B
Python
17 lines
442 B
Python
#! /usr/bin/env python
|
|
import subprocess
|
|
from time import sleep
|
|
|
|
# requires: espeak to be installed
|
|
|
|
waittimes = [1,2,1,4,1,4,1,4,1,4]
|
|
|
|
f=open("instructions.txt","r")
|
|
txt=f.readlines()
|
|
|
|
for i, line in enumerate(txt):
|
|
waittime = waittimes[i]
|
|
print i, waittime #, line,
|
|
subprocess.call(["espeak", line, "-v", "en"]) # character speaks: his/her line
|
|
sleep(waittime) # make pause after each text line
|
|
|