Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
[1.3.1] Fixed bug that prevented speech recognition due to a stupid mistake.
  • Loading branch information
Tiger-Tom authored Apr 25, 2021
1 parent 67ef066 commit f53d143
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Gandalf/VoiceControl.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
####################
version = '1.3'
version = '1.3.1'
####################
#Imports
import speech_recognition as sr
Expand Down Expand Up @@ -65,10 +65,10 @@ def mainInput(phrase_time_limit=None):
else:
try:
mic = sr.Microphone(micIndex)
if adjustForAmbientNoise == '1':
spR.adjust_for_ambient_noise(mic)
with mic as source:
print ('Getting input')
if adjustForAmbientNoise == '1':
spR.adjust_for_ambient_noise(mic)
if phrase_time_limit == None:
audio = spR.listen(source)
else:
Expand Down

0 comments on commit f53d143

Please sign in to comment.