Closed JPL1 closed 4 years ago
Issue-Label Bot is automatically applying the label bug
to this issue, with a confidence of 0.64. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
Try installing sapi5 by
pip install sapi
Thank you - I will try. It seems to be very machine specific. I've got it working on another laptop now.
I have a Flask app which picks up an image file(s), uses Tesseract OCR to get the text then converts text to mp3 using pyttsx3.
The first time of running it works fine: saves local .txt file(s) with the image text to a local directory, saves an mp3(s) with the speech file(s) to the same directory.
However, run it again without restarting and the pyttsx3 operation fails with
Removing pyttsx3 from the app solves the error - it's now possible to upload multiple images one after the other without it crashing, so it definitely seems to be pyttsx3 that's causing the glitch.
Solutions tried so far: Used pyttsx3 version 2.71 - app failed with a different coinitialise error Used 32 bit python interpreter - no difference
Used session instead of global variable for the text - no difference
Windows 10 Pro v1903 Browsers tried Edge, Chrome, Opera Python version 3.8.4 64bit pyttsx3 v 2.90 IDE = VS Code
Help appreciated