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

Phrase not spoken on second call to runAndWait() #36

Open
jbflowers opened this issue Nov 29, 2015 · 3 comments
Open

Phrase not spoken on second call to runAndWait() #36

jbflowers opened this issue Nov 29, 2015 · 3 comments

Comments

@jbflowers
Copy link

Hey there! So I installed your library from pip and started playing around with it. There's a weird bug I'm encountering on Ubuntu 15.04 with Python 2.7.9. When I run this for the first time:

   engine.say('The quick brown fox jumped over the lazy dog.')
   engine.runAndWait()

it works correctly, but when I run the exact same code again in a program the voice cuts off after saying the beginning of the phrase (I'd say one or two characters in). I noticed this running your Changing voices example.

@channon1
Copy link

try to set a value like a = engine.runAndWait() this seemed to work for me

I defined a function

    def say(s):
        engine = pyttsx.init()
        rate = engine.getProperty('rate')
        engine.setProperty('rate', rate)
        voices= engine.getProperty('voices')
        #for voice in voices:                                                                                    
        engine.setProperty('voice', 'english-us')
        #print voice.id                                                                                          
        engine.say(s)
        a = engine.runAndWait() #blocks     



    say('The slow red weasel jumped under the active cat')

@jbflowers
Copy link
Author

Seems to work with those changes!

@manjuhere
Copy link

Thank you! This works.

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

3 participants