Skip to content
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

Sound issue using pyttsx3 in virtual enviroment #72

Open
udabasili opened this issue Oct 31, 2019 · 0 comments
Open

Sound issue using pyttsx3 in virtual enviroment #72

udabasili opened this issue Oct 31, 2019 · 0 comments

Comments

@udabasili
Copy link

o basically I am building a python virtual assistant software in a virtual environment and I want to use pyttsx3 to convert text to speech. The first issue is that if i run pyttsx3.init() I get an error

File ".\__init__.py", line 3, in <module> init_speech() File "C:\Users\DJETHA\eclipse-workspace\PythonFull\PythonProjects\Betax\index.py", line 31, in init_speech engine = pyttsx3.init() File "C:\Users\DJETHA\eclipse-workspace\PythonFull\PythonProjects\Betax\venv\lib\site-packages\pyttsx3\__init__.py", line 46, in init eng = Engine(driverName, debug) File "C:\Users\DJETHA\eclipse-workspace\PythonFull\PythonProjects\Betax\venv\lib\site-packages\pyttsx3\engine.py", line 52, in __init__ self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug) File "C:\Users\DJETHA\eclipse-workspace\PythonFull\PythonProjects\Betax\venv\lib\site-packages\pyttsx3\driver.py", line 75, in __init__ self._module = importlib.import_module(name) File "C:\Users\DJETHA\eclipse-workspace\PythonFull\PythonProjects\Betax\venv\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 665, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "C:\Users\DJETHA\eclipse-workspace\PythonFull\PythonProjects\Betax\venv\lib\site-packages\pyttsx3\drivers\sapi5.py", line 3, in <module> import win32com.client File "C:\Users\DJETHA\eclipse-workspace\PythonFull\PythonProjects\Betax\venv\lib\site-packages\win32com\__init__.py", line 5, in <module> import win32api, sys, os

Upon doing my research I found out that using pyttsx3.init("dummy") wont generate any error. The next issue though is that when I run

engine =pyttsx3.init("dummy") engine.say("hey") engine.runAndWait()

I dont hear anything or see any error

I should note that if i used the above code without the dummy in the pyttsx3.init outside the virtual env, everything works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant