-
Notifications
You must be signed in to change notification settings - Fork 328
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
Code not executing completely #279
Comments
Screen.Recording.2023-06-13.at.10.41.57.PM.mov |
The function engine.runAndWait() is the culprit here. And the issue is with pytssx's integration with M1. And this is around since pytssx 1. #22 and Stackoverflow. |
@UmerTariq1 Is there any fix for this issue? |
pyttsx4 has the same issue. I'm running a Mac with an intel chip and runAndWait() kills the Python program. |
I'm getting the same problem too Running the code below:
And the python script escapes right after. |
i have updated the pyttsx4 for the nsss driver of macos. pip install pyttsx4 --upgrade
|
@Jiangshan00001 Thank you for the update. But I just tried pyttsx4 version 3.0.15 and it still has the same problem. The below code does not print "after". and also the problem of #280 is still there (which i understand you did not claim to have solved. but it would be awesome to have it solved. ) import pyttsx4
engine = pyttsx4.init()
def speak(text):
engine.say(text)
print("before")
engine.runAndWait()
print("after")
text = "Hi. How are you? what are you doing?"
speak(text) |
for the problem #280, is because default engine in linux is espeak, while default engine in mac is nsss. pip install TTS
for the current problem, i guess it maybe an package objc problem. and try: to see if any difference? |
Updating the pyobjc worked. Amazing. Thanks a lot. P.s excuse my ignorance but isnt coqui_ai_tts paid? Edit: just for reference, earlier i was using pyobjc v9.2. changing to 9.0.1 worked |
coqui_ai_tts is opensource and can use offline. |
Can confirm the same behavior with ´pyobjc v9.2´ does terminate without any error or information. However, ´pyobjc v.9.0.1´ works without any problems so far. Thanks for the fix @Jiangshan00001 |
The code is not executing after
speak("Hello! How can I assist you today?")
it only says "Hello! How can I assist you today?" after that code stops without any error in console.The text was updated successfully, but these errors were encountered: