I got this error plz help in solving this:-
self.pyaudio_module = self.get_pyaudio()
AttributeError: 'Microphone' object has no attribute 'get_pyaudio'
here are the codes
import pyttsx3
import datetime
import tracestack
import speech_recognition as sr
I got this error plz help in solving this:- self.pyaudio_module = self.get_pyaudio() AttributeError: 'Microphone' object has no attribute 'get_pyaudio' here are the codes import pyttsx3 import datetime import tracestack import speech_recognition as sr
engine = pyttsx3.init('sapi5') voices = engine.getProperty('voices') engine.setProperty('Voices', voices[1].id)
def speak(audio): engine.say(audio) engine.runAndWait()
def wishMe(): hour = int(datetime.datetime.now().hour) if hour>=0 and hour<12: speak("Good Morning!")
def takeCommand(): r = sr.Recognizer() with sr.Microphone() as source: print("Listening...") r.pause_threshold = 1 audio = r.listen(source)
if name == 'main': wishMe() takeCommand()