pyttsx3 icon indicating copy to clipboard operation
pyttsx3 copied to clipboard

pyttsx3 closing some GUI interfaces prematurely

Open a2435191 opened this issue 5 years ago • 2 comments

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()

a2435191 avatar Aug 01 '20 22:08 a2435191

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.

issue-label-bot[bot] avatar Aug 01 '20 22:08 issue-label-bot[bot]

Try running play sound in a seperate thread.

nateshmbhat avatar Aug 02 '20 04:08 nateshmbhat