This is the code
import pyttsx3
MASTER= "sir"
engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[0].id)
#speack function will pronunce the string which is passed to it
def speak(text):
engine.say(text)
engine.runAndWait()
speak("initiziling ")
After I run the command, i get this. I dont know why i am getting this but it is really frustrating
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\lucky\AppData\Local\Programs\Python\Python38\lib\site-packages\pyttsx3\drivers\sapi5.py", line 10, in <module>
import pythoncom
ModuleNotFoundError: No module named 'pythoncom'
PS C:\Users\lucky\Desktop\python\.vscode>
please help me