I have tries for past year to recreate your basic code and using techmoto code to help me understand it. I have consulted with chatgpt but still not getting the results I wish for. I can not seem to get the gui to continuously work...it freezes once the frames run and pyautogui will not respond in the main program even though I'm importing it into the main via a liberary.
Any help would be appreciated.
Thanks
Lloyd
Thanks so much for coming back to me I will try this out...fingers crossed
Make sure that you have the pygame code run in the main thread of the program.
So if you are doing what I do and want to have a thread running the GUI and one running the actual voice assistant, make the voice assistant get threaded off.
PyGame doesn’t seem to work well if it’s while loop isn’t in the main part of the code.
def main():
t1 = threading.Thread(target=“whatever your assist code is called”)
display() #starts pygame display
T1.start() #starts assistant thread
Face() # starts GUI
It took me a while to find that Pygame has to be like that otherwise it can’t respond to any inputs and basically crashes.
I hope that helps.