faizeeb commited on
Commit
90deb84
·
1 Parent(s): 07ff139

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -5,10 +5,10 @@ def listen(audio):
5
  r = sr.Recognizer()
6
  audio_file = sr.AudioFile(audio)
7
  with audio_file as source:
8
- audio = r.listen(source)
9
  try:
10
- text = r.recognize_google(audio, language='ur')
11
- return "You said : {}".format(text)
12
  except:
13
  return "Sorry could not recognize what you said"
14
 
 
5
  r = sr.Recognizer()
6
  audio_file = sr.AudioFile(audio)
7
  with audio_file as source:
8
+ aud = r.listen(source)
9
  try:
10
+ text = r.recognize_google(aud, language='ur')
11
+ return text
12
  except:
13
  return "Sorry could not recognize what you said"
14