pyttsx3 icon indicating copy to clipboard operation
pyttsx3 copied to clipboard

runAndWait() causes opencv camera feed to freeze

Open corlangerak opened this issue 3 years ago • 1 comments

HI does anyone know why using pyttsx3 causes my opencv camera window to either close, or freeze? I would like to be able to speak out detected objects. Any ideas to prevent this from happening or workaround? Maybe I am missing something...

corlangerak avatar Apr 02 '21 12:04 corlangerak

Use Threading. You need to use pyttsx3 engine in separate thread instead of main thread. Let open-cv run on main thread and the pyttsx3 engine inside threading.Thread()

FireHead90544 avatar Apr 19 '21 17:04 FireHead90544