pyttsx3
pyttsx3 copied to clipboard
pyttsx3 closing some GUI interfaces prematurely
When I run pyttsx3 with, say, rumps or tkinter and use runAndWait, the GUI quits prematurely. Any idea why this might be happening/how to fix? I am running the following sample code on MacOS 10.14, Python 3.8.x.
import tkinter as tk
import pyttsx3
engine = pyttsx3.init()
def play_my_sound():
engine.say("Hello world")
engine.runAndWait()
window = tk.Tk()
window.after(1000, play_my_sound)
window.mainloop()
Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.84. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
Try running play sound in a seperate thread.