Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running a driver event loop - doesnt work very reliably on Windows - be warned... #312

Open
willwade opened this issue May 3, 2024 · 2 comments

Comments

@willwade
Copy link

willwade commented May 3, 2024

So from the docs..
onWord and onEnd are not reliably giving back location, length.. its basically unreliable this as an event handler for word level.
Mac - nice!

import pyttsx3

def onStart(name):
   print('starting', name)
def onWord(name, location, length):
   print('word', name, location, length)
def onEnd(name, completed):
   print('finishing', name, completed)
engine = pyttsx3.init()
engine.connect('started-utterance', onStart)
engine.connect('started-word', onWord)
engine.connect('finished-utterance', onEnd)
engine.say('The quick brown fox jumped over the lazy dog.')
engine.runAndWait()

on a mac

starting None
word None 0 3
word None 4 5
word None 10 5
word None 16 3
word None 20 6
word None 27 4
word None 32 3
word None 36 4
word None 41 4
finishing None True

on Windows

starting None
word None 1 0
finishing None True
@willwade
Copy link
Author

willwade commented May 3, 2024

aha re: #186

@willwade
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant