Prageeth-1 commited on
Commit
9e788d4
·
verified ·
1 Parent(s): 2d7def2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -12,6 +12,7 @@ import io
12
  import speech_recognition as sr
13
  from gtts import gTTS
14
  import os
 
15
 
16
  # Download NLTK resources
17
  nltk.download('punkt')
@@ -46,7 +47,7 @@ def recognize_speech():
46
  st.error("Sorry, could not understand the audio.")
47
  except sr.RequestError:
48
  st.error("Could not request results, check your internet connection.")
49
- return None
50
 
51
 
52
  # Preprocessing function (same as in Section 01)
 
12
  import speech_recognition as sr
13
  from gtts import gTTS
14
  import os
15
+ import sounddevice as sd
16
 
17
  # Download NLTK resources
18
  nltk.download('punkt')
 
47
  st.error("Sorry, could not understand the audio.")
48
  except sr.RequestError:
49
  st.error("Could not request results, check your internet connection.")
50
+ return Non
51
 
52
 
53
  # Preprocessing function (same as in Section 01)