I am a beginner I don't know much about speech recognition and hotwords.
Till now I have been using SpeechRecognition module but its not so accurate as:
- I have to wait for the program to access my mic
- Its not accurate even tough I use ambient_noise
This is what I have tried till now
try:
with sr.Microphone() as source:
r.adjust_for_ambient_noise(source, duration=2)
listening_audio = r.listen(source, phrase_time_limit=3)
try:
command = r.recognize_google(listening_audio, language='en-in')
self.Command.emit(command)
except sr.UnknownValueError:
print('')
except Exception as e:
print('First error:', str(e))
except Exception as e:
print("Second error:", str(e))
I want help for my program to work as expected or if anyone can give me excess to the Snowboy website. Either of them would help me achive my goal.
Try using the
pyttsx3
module withspeech_recognition
This should work and should be better than your code. Try it out.