-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The script throws a "Class not registered" error when using PyInstaller (pyttsx3 + IVONA voices), although it works stably in PyCharm #403
Comments
|
I have the latest version of pyinstaller-hooks-contrib installed. And even uninstalling + reinstalling also did not help fix the situation. This problem is reproduced on another computer that has Windows 10 installed. And, as I wrote earlier, it is associated with specific voice options. Can you at least suggest how you can determine what data the script lacks for normal operation? I would try to fix the problem myself, but I was never able to get a sufficiently informative log that would help me specify the problem. |
Hmm, does |
I doubt it does - the error message looks like a COM class is not registered, and that How does one install that "IVONA 2 Tatyana OEM" voice? Does it need to be installed externally on the system, outside the python/pyttsx3? |
No, Yes, the voice is installed from outside. I took from the Internet and use this file |
There are DLLs in One way to work around this is to collect those DLLs into frozen application, for example via I'm not sure if that's enough to make a portable application, though; i.e., does the engine require other stuff from import os
speech2go_libs_dir = r'C:\Program Files (x86)\Speech2Go Voice Package\x64'
if os.path.isdir(speech2go_libs_dir):
print(f"Adding {speech2go_libs_dir} to DLL paths...")
os.add_dll_directory(speech2go_libs_dir)
if "PATH" in os.environ:
os.environ["PATH"] = speech2go_libs_dir + os.pathsep + os.environ["PATH"]
else:
os.environ["PATH"] = speech2go_libs_dir
import pyttsx3
tts_engine = pyttsx3.init(debug=True)
# [...] |
Yes, it works. Thanks! Is it possible to take this into account in PyInstaller so that in the future no one will have such problems? I mean clearing the search path. |
A simple script works well in pyCharm, but if compiled with the command (removing -F doesn't help)
then during the processing of "runAndWait ()" it first shows 3 identical system windows with the error "load lib failed", and after closing these windows it shows an error in the log:
At the same time, if you use the standard system voice, there is no problem.
4.10
(and latest development version)3.10
(3.7)Windows 10 Pro Rus
python.org/downloads
2.90
(2.71)If the problem is not directly related to PyInstaller, then, if possible, please tell me at least what exactly could be the reason. I've been trying to figure out the problem for the third day and have not yet been able to find a solution.
The text was updated successfully, but these errors were encountered: