I have solved it with the following code. I'd be happy to share the whole script if anyone is interested.

def run_countdown(self): self.setup_view_main() self.countdown() def countdown(self): if self.time > 0: if self.time <= 3: speech.say(str(self.time), "en-US", 0) view_main["lbl_time"].text = str(self.time) self.time -= 1 ui.delay(self.countdown, 1) elif self.round < self.data["rounds"]: self.switch_states() self.run_countdown() list item