Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,9 +32,9 @@ def record_text(audio_file,prompt):
|
|
32 |
r.adjust_for_ambient_noise(source)
|
33 |
print("Converting audio file to text..")
|
34 |
audio2 = r.record(source, duration=None) # Use record instead of listen
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
return (MyText,prompt)
|
39 |
|
40 |
def message_and_history(audio_file,input, history, api_key):
|
|
|
32 |
r.adjust_for_ambient_noise(source)
|
33 |
print("Converting audio file to text..")
|
34 |
audio2 = r.record(source, duration=None) # Use record instead of listen
|
35 |
+
|
36 |
+
MyText = r.recognize_google(audio2, language="en-US", key=None, show_all=False)
|
37 |
+
MyText = MyText.lower()
|
38 |
return (MyText,prompt)
|
39 |
|
40 |
def message_and_history(audio_file,input, history, api_key):
|