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

runAndWait() doesn't return when calling say(..) with umlauts #29

Open
datenstrudel opened this issue Jan 23, 2015 · 1 comment
Open

Comments

@datenstrudel
Copy link

engine = pyttsx.init()
engine.say("Bächtig möse")
engine.runAndWait() # <--- This call won't return

Hi, was just wondering why my program doesn't continue. Of course, quick fix is to just replace such characters before calling say(..). Don't know if there are other characters causing that behavior.
Tested with python 2.7 under Windows 7

@westonpace
Copy link

Have you tried u"Bächtig möse"?

What you posted is not actually a valid Python 2.7 string (it will decode the 14 UTF-8 bytes into a 14 byte ASCII string) without the u prefix.

>>> x = "Bächtig möse"
>>> x
'B\xc3\xa4chtig m\xc3\xb6se'
>>> len(x)
14
>>> x = u"Bächtig möse"
>>> x
u'B\xe4chtig m\xf6se'
>>> len(x)
12

I have tested with the u prefix on my fork and know it works there but I cannot confirm if that is because of changes I have made on the fork or simply this u prefix issue.

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

2 participants