How to run multiple while loops at a time in Python

I’m trying to work on a simple Pygame program for a project that simply displays some faces and talks in a text to speech voice, but there is a while loop at the end that is necessary for the code to run but blocks another while loop that I need for the program from running. The while loop I’m trying to add uses time.sleep(), so if I try to put it into the same block as the first one which needs to be constantly running the program crashes. I’m sure I’m probably looking over something obvious but any help would be appreciated, thanks!