The issue i am having using this text to speech is that it start play before a panel is open , how do i get it to play after a panel in wxpython is open

import pyttsx3


engine = pyttsx3.init()


engine.say("Welcome to 24-hour ATM service")
engine.say("Thank you")

I see no code there to open a panel. That's probably why. Or you decided to not show your complete minimal viable example.