Update app.py
Browse files
app.py
CHANGED
@@ -539,23 +539,23 @@ def get_user_location():
|
|
539 |
if option == "Home":
|
540 |
user_question = st.text_input("Type your symptoms or disease name:")
|
541 |
|
542 |
-
|
543 |
|
544 |
-
uploaded_file = st.file_uploader("Upload an audio file (.wav)", type=["wav"])
|
545 |
|
546 |
-
if uploaded_file:
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
|
560 |
# lang = st.selectbox("Select Language", ["English", "Hindi", "Spanish"])
|
561 |
# if lang != "English":
|
|
|
539 |
if option == "Home":
|
540 |
user_question = st.text_input("Type your symptoms or disease name:")
|
541 |
|
542 |
+
# st.title("🎤 AI Health Assistant - Speech to Text")
|
543 |
|
544 |
+
# uploaded_file = st.file_uploader("Upload an audio file (.wav)", type=["wav"])
|
545 |
|
546 |
+
# if uploaded_file:
|
547 |
+
# recognizer = sr.Recognizer()
|
548 |
+
# with sr.AudioFile(uploaded_file) as source:
|
549 |
+
# st.info("Processing audio...")
|
550 |
+
# audio = recognizer.record(source)
|
551 |
|
552 |
+
# try:
|
553 |
+
# text = recognizer.recognize_google(audio)
|
554 |
+
# st.success(f"Recognized Text: {text}")
|
555 |
+
# except sr.UnknownValueError:
|
556 |
+
# st.error("Could not understand the audio")
|
557 |
+
# except sr.RequestError:
|
558 |
+
# st.error("Error with the speech recognition service")
|
559 |
|
560 |
# lang = st.selectbox("Select Language", ["English", "Hindi", "Spanish"])
|
561 |
# if lang != "English":
|