Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ if "history" not in st.session_state:
|
|
12 |
|
13 |
def recognize_speech(audio_data, show_messages=True):
|
14 |
recognizer = sr.Recognizer()
|
15 |
-
audio_recording = sr.Microphone(device_index
|
16 |
|
17 |
with audio_recording as source:
|
18 |
recognizer.adjust_for_ambient_noise(source)
|
|
|
12 |
|
13 |
def recognize_speech(audio_data, show_messages=True):
|
14 |
recognizer = sr.Recognizer()
|
15 |
+
audio_recording = sr.Microphone(device_index=4, sample_rate=16000, chunk_size=1024)
|
16 |
|
17 |
with audio_recording as source:
|
18 |
recognizer.adjust_for_ambient_noise(source)
|