Closed CaptainDaVinci closed 6 years ago
@kb-studios , please take a look at this issue
For me, pyttsx worked in Linux. But while testing it out on windows I had to go for pyttsx3. Ok then its better that we go with pyttsx3.
For the windows version I did
import pyttsx3 as pyttsx
This fix worked, as I didn't have to re-factor the rest of the code.
import wx
import re
import os
import wikipedia
import time
import webbrowser
import json
import requests
import ctypes
import random
import urllib
import ssl
from bs4 import BeautifulSoup
import speech_recognition as sr
import requests
# Import urllib (according to the version the OS supports)
try:
from urllib import urlopen
except:
try:
from urllib.request import urlopen
except:
print("urllib is not installed")
# Import pyttsx (according to the version the OS supports)
try:
import pyttsx
except:
try:
import pyttsx3 as pyttsx
except:
print("Pyttsx not installed")
For now, am doing the imports this way. So as to avoid any sorts of errors while configuring the dependencies.
I have tried installing the dependencies from
./linux/requirements-linux.txt
however I am facing problems with certain modules.pyttsx
gives an import error in python3, for python3pyttxs3
is required.