clock = pygame.time.Clock()
pygame.mixer.music.load(soundfile)
pygame.mixer.music.play()
while pygame.mixer.music.get_busy():
    clock.tick(FRAMERATE)
How to do text to speech with python on a Toshiba laptop and Windows 7?