Closed qilongqiu closed 6 years ago
import pyttsx,sys,os from apscheduler.schedulers.blocking import BlockingScheduler reload(sys) sys.setdefaultencoding('utf8') engine = pyttsx.init() rate = engine.getProperty('rate') engine.setProperty('rate', rate - 50) volume = engine.getProperty('volume') engine.setProperty('volume', volume + 0.25) def getTicker_wrap(): engine.say('abcdefghijklmnopqrstuvwxyz') #engine.runAndWait() print 'x' def run(): engine.runAndWait() if __name__ == '__main__': scheduler = BlockingScheduler() scheduler.add_job(getTicker_wrap, 'interval', seconds=10) scheduler.add_job(run, 'interval', seconds=11) print('Press Ctrl+{0} to exit'.format('Break' if os.name == 'nt' else 'C')) try: scheduler.start() except (KeyboardInterrupt, SystemExit): pass
Will only play once what should I do
Same here, facing same issue for python2.7!, For python 3.5 pyttsx3 is working all right
Will only play once what should I do