Closed silas-hw closed 2 years ago
TTS now uses a multiprocess process! Checking task manager when running the app shows that once the TTS finishes Python kills the 'zombie' process by itself. There's no way of 'activating' the buttons after the TTS has finished within the TTS function itself. However, a solution would be calculating how long the TTS should take by its rate and the length of the text and then using the 'after' method in Tkinter to reactivate the buttons after the TTS has finished.
Deactivation and reactivation of buttons are now added.
Tkinter freezes when the OCR and TTS are running. To fix this we can do the OCR and TTS in a thread or multiprocess (which built-in libraries exist for!). The only tricky part will be disabling the buttons whilst the TTS is playing to stop the user from creating too many threads or processes.