A20doc
A20doc
A20doc
REPORT ON
BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE AND ENGINEERING(AI&ML)
SUBMITTED BY
AKULA DAAKSHAYANI
CERTIFICATE
This is to certify that Mini Project entitled “Talking Healthcare Chatbot using Deep Learning”, done
by A. Daakshayani (21BK1A6604) in partial fulfilment for the award of the degree of Bachelor of
Technology in COMPUTER SCIENCE AND ENGINEERING(AI&ML) is a record of bonafide
work done by him/her under my supervision during the academic year “2024 – 2025”.
sincerely express my deep sense of gratitude to Dr. P. Deepan for his valuable guidance, encouragement
and cooperation during all phases of the project.
We greatly indebted to my Project Coordinator Mr. A. Govind, for providing his valuable advice,
constructive suggestions and encouragement without whom it would not been possible to complete this
project.
It is a great opportunity to render my sincere thanks to Ms. M. Arsha Reddy, Head of the Department,
Computer Science and Engineering (AI&ML) for her timely guidance and highly interactive attitude
which helped us a lot in successful execution of the Project.
We extremely thankful to our Principal Dr. K. Sree Latha, who stood as an inspiration behind this
project and heartfelt for her endorsement and valuable suggestions.
We respect and thank our secretary, Sri. T. V. Reddy, for providing us an opportunity to do the
project work at St. Peter’s Engineering College and I am extremely thankful to him for providing
such a nicesupport and guidance which made us to complete the project.
We also acknowledge with a deep sense of reverence, my gratitude towards our parents, who have
always supported me morally as well as economically. I also express gratitude to all my friends who
have directly or indirectly helped me to complete this project work. I hope that I can build upon the
experience and knowledge that I have gained and make a valuable contribution towards the growth of
the society in coming future.
DECLARATION
We hereby declare that the project entitled, “Talking Healthcare Chatbot using Deep Learning”, is
the work done during the AY 2024-25 and is submitted as project in partial fulfillment for the award
of degree of Bachelor of technology in COMPUTER SCIENCE AND ENGINEERING (AI&ML)
from St. Peter’s Engineering College affiliated to JNTUH.
NAME ROLL NO
To be a renowned Educational Institution that molds Students into Skilled Professionals fostering
Technological Development, Research and Entrepreneurship meeting the societal needs.
INSTITUTE MISSION
IM1: Making students knowledgeable in the field of core and applied areas of Engineering to innovate
Technological solutions to the problems in the Society.
IM2: Training the Students to impart the skills in cutting edge technologies, with the help of relevant
stake holders.
IM3: Fostering conducive ambience that inculcates research attitude, identifying promising fields for
entrepreneurship with ethical, moral and social responsibilities.
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING(AI&ML)
DEPARTMENT VISION
To improve fundamentals and make it easier to address the ever-expanding needs of society by producing
the best leaders in artificial intelligence and machine learning via excellence in research and education.
DEPARTMENT MISSION
DM2: Impart rigorous training to generate knowledge through the state-of-the-art concepts and
technologies in Artificial Intelligence and Machine Learning.
DM3: To enhance research in emerging areas by collaborating with industries and institutions at the
national and international levels.
PROGRAM OUTCOMES (POs):
PO1: Engineering Knowledge: Apply the knowledge of mathematics, science, engineering
fundamentals and provide solutions in the engineering specialization of artificial intelligence and
machine learning.
PO2: Problem Analysis: Identify, formulate, review research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of mathematics,
natural sciences, and engineering sciences.
PO5: Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modelling to complex engineering
activities with an understanding of the limitations.
PO6: The engineer and society: Apply reasoning informed by the contextual knowledge to
assess societal, health, safety, legal and cultural issues and the consequent responsibilities relevant to
the professional engineering practice.
PO8: Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
PO9: Individual and team work: Function effectively as an individual, and as a member or
leader in diverse teams, and in multidisciplinary settings.
PO10: Communication: Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as, being able to comprehend and write
effective reports and design documentation, make effective Presentations, and give and receive clear
instructions.
PO12: Life-long learning: Recognize the need for, and have the preparation and ability to
engage in independent and life-long learning in the broadest context of technological change.
PEO1: Work effectively in interdisciplinary field with the knowledge of Artificial Intelligence
and Machine Learning to develop solutions to the real-world problems.
PEO2: To communicate and work effectively on team-based engineering projects and will
practice the ethics of their profession consistent with a sense of social responsibility.
PEO3: Excel as socially committed engineers or entrepreneurs with high ethical and moral
values.
PSO1: Apply fundamental concepts of Artificial Intelligence and Machine Learning to solve
PSO2: To communicate and work effectively on team based engineering projects and will
practice the ethics of their profession consistent with a sense of social responsibility.
TABLE OF CONTENTS
ABSTRACT
1. INTRODUCTION
1. Motivation
2. Problem Definition
4. Limitations
2. LITERATURE SURVEY
1. Existing System
3. Proposed System
3. ANALYSIS
1. Requirement Specification
2. Software Requirements
4. DESIGN
1. System Architecture
2. Input design
3. Output design
ix
5. IMPLEMENTATION
1. Technologies used
2. Sample code
3. Flow charts
1. Introduction
2. Test Approach
3. Validation
7. RESULTS
9. REFERENCES
x
ABSTRACT
This project presents a voice-activated healthcare chatbot powered by deep learning, designed to assist
users with symptom assessment and healthcare information. The chatbot leverages natural language
processing (NLP) and deep learning to understand user inputs, classify symptoms, and provide relevant
responses. Using a pre-trained neural network model, the chatbot can recognize intent and generate
appropriate, conversational responses based on a curated dataset of healthcare-related queries and
answers.
The chatbot incorporates speech recognition to capture user symptoms through voice input, allowing
hands-free interaction, which is particularly beneficial in healthcare settings where quick access to
information is crucial. The model processes inputs by tokenizing and lemmatizing the text, converting
it into a bag-of-words representation to predict the user’s intent with a deep neural network. The intent
classification model, trained on an annotated dataset of medical conditions, enables the chatbot to
respond with accurate health-related advice or recommend further action based on the severity and
nature of the symptoms.
This system’s voice interface, powered by text-to-speech technology, also allows it to cater to users
with visual impairments or those seeking convenience in receiving healthcare support. By combining
deep learning with speech recognition and synthesis, this healthcare chatbot represents an innovative
approach to providing accessible, responsive, and personalized healthcare information in real-time.
xi
INDEX
2 Existing System 6
9
4 Software Requirements
5 System Architecture 14
6 Output 26
7 Conclusion 28
8 Reference 29
xii
CHAPTER-1
INTRODUCTION
In recent years, conversational agents, or chatbots, have become a transformative tool in the healthcare
industry, offering users quick and convenient access to healthcare information. The Talking
Healthcare Chatbot, powered by deep learning, is designed to understand and respond to user queries
about symptoms, conditions, and general health advice, serving as an accessible resource for
preliminary symptom analysis and information. The chatbot employs natural language processing
(NLP) and neural networks to interpret user input and provide relevant responses, making it a valuable
asset in healthcare settings where efficient, hands-free interaction is desirable.
Deep learning techniques enable the chatbot to recognize complex language patterns and classify user
intentions accurately, allowing it to deliver personalized responses based on a structured dataset of
healthcare-related intents and symptoms. Users can interact with the chatbot through speech, thanks
to integrated speech recognition and text-to-speech (TTS) capabilities, which provide a more natural,
conversational experience. This voice-driven approach is particularly beneficial for users with visual
impairments, those in hands-busy situations, or anyone seeking a user-friendly way to access medical
information without the need to navigate text-based interfaces.
The system uses a pre-trained neural network model trained on a variety of healthcare queries, which
helps classify symptoms and suggest responses based on both the intent and the probability of
accuracy. By combining NLP, deep learning, and voice interfaces, this healthcare chatbot bridges the
gap between technology and accessibility, empowering users to make informed decisions about their
health and encouraging proactive engagement with healthcare information.
1
1.1 MOTIVATION
The motivation behind developing a talking healthcare chatbot using deep learning arises from the need
for accessible, immediate, and reliable health information for individuals across diverse settings. In
many cases, individuals seeking health guidance face challenges such as limited access to healthcare
professionals, especially in remote or underserved areas, or they may require immediate answers
outside of clinic hours. The use of an intelligent, voice-activated healthcare chatbot can address these
needs, providing users with accurate and relevant health information instantly, helping to alleviate
healthcare bottlenecks, and empowering individuals to take proactive steps in managing their health.
This chatbot also aims to promote preventative healthcare by encouraging users to engage with health-
related information early, reducing unnecessary in-person consultations and helping individuals better
understand symptoms or potential health issues. By using deep learning to make the chatbot’s responses
contextually aware and user-centric, the system serves as a first line of information, ultimately
contributing to a more informed public and a more efficient healthcare system.
Access to timely and accurate health information is a critical challenge for many individuals,
particularly those in remote areas, with limited mobility, or requiring quick responses to health-related
questions outside of medical facilities. Traditional healthcare systems often face resource constraints,
long wait times, and geographical limitations, creating barriers to immediate care and health guidance.
This issue highlights the need for a solution that allows individuals to access reliable health information
independently, while also alleviating pressure on healthcare systems.
The Talking Healthcare Chatbot using deep learning addresses this problem by providing users with
Using natural language processing (NLP) and a neural network model trained on a wide range of health-
related topics, the chatbot can interpret user symptoms, classify intent, and provide appropriate
responses based on a structured dataset of medical information. This approach enables the chatbot to
offer accurate, contextually relevant advice for symptom assessment, as well as guidance on when to
2
This healthcare chatbot represents a scalable solution to bridge the gap in healthcare accessibility,
promoting preventative care, and supporting users in managing health-related questions autonomously.
• To utilize deep learning techniques to classify user symptoms accurately and identify the intent
behind healthcare-related queries.
• To provide a voice-based interface that supports hands-free interaction, making healthcare information more
accessible to individuals with disabilities.
• To deliver immediate responses to common health questions, providing users with actionable
advice and information.
• To encourage proactive health management by educating users on symptoms, conditions, and when
to seek professional medical assistance.
1.4 LIMITATIONS
1.4.1 Accuracy and Reliability of Health Information: Although the chatbot can provide general
health information and guidance, its responses are based on a fixed dataset and may lack the
precision required for nuanced or complex medical cases.
1.4.2 Ethical and Privacy Concerns: Handling sensitive health data in conversational interactions
raises concerns about data security and privacy. Ensuring that user data remains confidential
and that the chatbot adheres to data protection regulations is crucial but challenging, especially
when handling potentially sensitive health information.
3
CHAPTER-2
LITERATURE SURVEY
The development of healthcare chatbots using deep learning has gained attention in recent years,
primarily due to advancements in natural language processing (NLP) and artificial intelligence (AI)
that have enabled chatbots to provide medical information and support to users in real time. Numerous
studies have explored the application of NLP in healthcare chatbots to interpret and generate language relevant
to medical contexts. Researchers such as Liu et al. (2020) demonstrated that word embeddings, tokenization,
and lemmatization play a crucial role in enabling chatbots to understand complex symptom descriptions and
medical terminology. More recent work has focused on the use of Transformer models, such as BERT and GPT,
to improve intent classification and entity recognition in healthcare contexts, allowing chatbots to better interpret
user inputs. The literature highlights significant progress in the field of healthcare chatbots using deep learning,
with advancements in NLP, intent classification, and ASR contributing to improved chatbot functionality.
However, challenges remain, including the need for high-quality datasets, ethical considerations, and limitations
in diagnostic capabilities. Addressing these issues will be essential for furthering the development and
acceptance of healthcare chatbots as reliable tools in digital healthcare.
Various healthcare chatbots are currently in use, leveraging deep learning to offer support,
education, and preliminary health assessments. These systems are designed to provide
immediate, conversational access to health information and resources through either text or
voice.
1. Ada Health: Ada Health is a popular AI-driven health assessment platform that uses deep
learning and NLP to evaluate user symptoms and provide health insights. Users input their
symptoms, and Ada’s chatbot uses a symptom-checking algorithm to suggest possible causes and
appropriate next steps. The system is built on a large medical knowledge database and provides a
user-friendly, interactive assessment.
2. Babylon Health: Babylon Health provides virtual consultations and a chatbot-based symptom
checker. It uses deep learning and NLP to engage with users, identify symptoms, and recommend
potential treatments or medical actions. Babylon Health’s chatbot relies on a vast dataset to improve
symptom-matching accuracy.
4
3. Buoy Health: Buoy Health combines deep learning algorithms with NLP to provide a text-
based health assessment tool. Buoy asks users a series of questions about their symptoms and provides
potential explanations for their condition. By processing the input data with a deep learning model,
Buoy can evaluate user responses and recommend next steps, such as self-care advice or visiting a
doctor.
4. Healthily (formerly Your.MD): Healthily is an AI-driven health assistant that uses deep
learning for symptom checking and health education. The chatbot aims to empower users with
accurate health information by asking them about their symptoms and providing potential causes.
Healthily is accessible via web and mobile apps, and it uses NLP to interpret symptoms in real-time.
5.Woebot for Mental Health: Woebot is a chatbot designed for mental health support rather
than physical health assessment, but it demonstrates a strong application of deep learning in
healthcare. It uses NLP and sentiment analysis to interact with users, guide them through cognitive
behavioral therapy (CBT) techniques, and offer mental health resources.
• Chatbots struggle to adapt responses based on users' medical lifestyles, or specific conditions.
• Existing systems are limited by predefined datasets and may not provide reliable information.
• Integrates an Automatic Speech Recognition (ASR) system to convert spoken input into text.
• This module utilizes advanced models like BERT or GPT for better contextual understanding and
entity recognition.
• A trained neural network that classifies symptoms, predicts possible conditions, and generates
responses based on user queries.
5
2.4 ADVANTAGES OF PROPOSED SYSTEM
2. Personalized User Experience : By employing machine learning algorithms, the chatbot can
analyze individual user interactions and preferences, enabling it to provide personalized
recommendations and responses. This capability enhances the user experience by tailoring
interactions to specific health concerns or previous inquiries.
3. Real-Time Interaction: The proposed system can provide instant responses to user inquiries,
offering timely health information and recommendations. This immediacy is crucial in
healthcare settings, where users often seek quick guidance on symptoms or health-related
questions.
4. Cost-Effective Solution: By automating initial patient interactions, the chatbot can reduce the
workload on healthcare professionals, allowing them to focus on more complex cases. This can
lead to significant cost savings for healthcare providers while improving overall operational
efficiency.
6
CHAPTER-3
ANALYSIS
Requirement specifications for the project on "Talking Healthcare Chatbot using Deep
Learning" can help define the necessary components, functionalities, and constraints of the project.
• Data Sources: To develop an effective talking healthcare chatbot that leverages deep learning,
various data sources are essential. These sources provide the necessary information for training the
chatbot's natural language processing (NLP) capabilities, symptom understanding, and response
generation.
• Data Privacy: Data privacy is a critical consideration in the design and implementation of a talking
healthcare chatbot using deep learning. Given the sensitive nature of health-related information, it is
essential to establish robust protocols to protect user data from unauthorized access and misuse.
2. Data Preprocessing:
• Data Cleaning: Define procedures for handling missing data, outliers, and noisy data.
• Feature Engineering: It involves the selection, modification, or creation of features from raw data
that can improve the model's performance.
• Selection of Algorithms: Identify the DL algorithms to be used for Talking Healthcare Chatbot for
this particular project I am using Neural Network Algorithm.
7
4. Early Detection and Diagnosis:
• Criteria for Early Detection: The ability to accurately identify the user’s intent based on their
input.
• Treatment Options: Define the range of treatment options to be considered, including medication,
lifestyle modifications, and dietary plans.
• Personalization: Describe how treatment plans will be personalized based on individual patient
characteristics.
• Progression Forecasting: Specify the DL model for forecasting Chatbot progression and associated
comorbidities.
• Monitoring Protocol: Define protocols for long-term patient monitoring and interventionadjustment.
• Performance Metrics: Specify the metrics used to evaluate the effectiveness of the DL models.
• Integration with Healthcare Systems: Define how the DL-based solution will be integrated into
existing healthcare systems and workflows.
•Scalability: Specify plans for scaling the solution to accommodate a growing number of patients and
data.
• Expertise: Identify the required skills and expertise of team members, including data scientists,
healthcare professionals, and software developers.
• Infrastructure: Specify the hardware and software resources needed for model development.
8
3.2 SOFTWARE REQUIREMENTS
9
• Time Series Analysis: Time series analysis in the context of a talking healthcare chatbot involves
analyzing and predicting health-related data over time. This can enhance the chatbot's capabilities
by allowing it to understand trends, seasonal patterns, and changes in user symptoms or health
metrics over time.
Model Evaluation:
• Employ appropriate evaluation metrics, such as accuracy, precision, recall, F1-score, ROC-
AUC, or MSE (Mean Square Error) for regression models, to assess the performance of the
model.
• Implement cross-validation to ensure model robustness and avoid overfitting.
Model Interpretability:
• Utilize techniques for model interpretability, such as SHAP (SHapley Additive explanations)
values or LIME (Local Interpretable Model-Agnostic Explanations), to make the model's
predictions more transparent and understandable to healthcare professionals.
Deployment:
• Once a robust and accurate model is developed, deploy it in a secure and scalable
environment, such as a cloud-based platform, for real-time or batch predictions.
10
Continuous Improvement:
• Continuously monitor and update the model as more data becomes available or as medical
knowledge advances to ensure its effectiveness over time.
Regulatory Compliance:
• Ensure compliance with relevant regulatory bodies and standards for healthcare AI, such as
the FDA's guidelines for medical software.
11
CHAPTER-4
DESIGN
Data Collection: Gather relevant data, including user symptoms, demographics, and health metrics.
Data Preprocessing: Data preprocessing steps involve cleaning and preparing the data for machine
learning. This includes data cleaning, feature extraction, and data transformation.
Deep Learning: This section includes model training and model evaluation components. Deep
learning models are trained on the preprocessed data, and their performance is evaluated.
Prediction: The prediction capabilities of a talking healthcare chatbot using deep learning revolve
around understanding user inputs, analyzing symptoms, and providing relevant health information .
12
4.2 INPUT DESIGN
The input design of a talking healthcare chatbot using deep learning is crucial as it directly impacts
user experience, engagement, and the quality of interaction. Effective input design ensures that users
can communicate their symptoms, queries, and concerns clearly, while the chatbot can accurately
interpret and respond to these inputs. Effective input design for a healthcare chatbot ensures a smooth,
intuitive, and reliable user experience. It combines user-friendly prompts, guided symptom collection,
and robust NLU models to accurately interpret and address users’ health concerns. This approach
ultimately creates a responsive and supportive tool that users can trust for their health- related
inquiries..
The output design for a talking healthcare chatbot powered by deep learning requires a balance
between clarity, personalization, and guidance. An effective output design provides users with
accurate information in a conversational, accessible format. By combining clear responses,
personalized recommendations, confidence indicators, and interactive elements, the chatbot becomes
a useful health companion. The ultimate goal is to empower users to make informed health choices,
knowing when to seek further medical help and how to manage minor issues at home.
13
CHAPTER-5
IMPLEMENTATION
Python:
Python is of paramount importance in this project on "Talking Healthcare
Chatbot using Deep Learning" due to its exceptional capabilities in the fields of data analysis, deep
learning, and scientific computing. Python offers an extensive ecosystem of libraries and
frameworks, such as TensorFlow, scikit-learn, and pandas, specifically designed for tasks crucial to
this project. Its user-friendly syntax facilitates rapid development and experimentation, crucial for
fine-tuning machine learning models and exploring complex datasets. Python's wide adoption in
the machine learning community ensures a wealth of resources, tutorials, and community support,
streamlining problem- solving and collaboration. Moreover, Python's versatility allows for
seamless integration with web development tools, databases, and visualization libraries, ensuring a
holistic approach to data-driven healthcare solutions. In sum, Python's comprehensive toolkit and
strong community make it an indispensable asset, empowering this project to effectively address
the intricate challenges of symptoms detection and prediction.
Deep Learning:
The integration of Deep Learning (DL) into this project on "Talking Healthcare Chatbot
Using Deep Learning" holds paramount importance. Deep learning plays a vital role in powering
the capabilities of a talking healthcare chatbot. It enables the chatbot to interpret complex language,
understand and classify medical symptoms, and provide accurate and relevant health guidance to
users. The use of deep learning in a talking healthcare chatbot elevates its ability to understand,
predict, and respond to complex health inquiries. With advanced natural language processing,
predictive capabilities, and continuous adaptation. Deep learning transforms the chatbot into a
valuable health companion that can offer timely information, preliminary support, and insights into
health conditions. The result is a user-friendly, efficient, and trustworthy tool that enhances both
patient engagement and healthcare access.
14
Visual Studio Code:
Visual Studio Code (VS Code) is used for developing a talking healthcare chatbot powered by
deep learning offers several advantages that streamline the development process, enhance
productivity, and support collaborative efforts. VS Code is known for being lightweight yet powerful,
making it suitable for developing large projects, like healthcare chatbots, without burdening system
resources. It runs seamlessly on Windows, macOS, and Linux, allowing team members to work on
the project from various operating systems without compatibility issues. The built-in terminal in VS
Code allows developers to run commands, install packages, and execute code without leaving the
editor, which is particularly useful when working with virtual environments and dependencies in
deep learning projects. VS Code’s features like IntelliSense (auto-complete), code linting, and
formatting tools help maintain clean and readable code, which is crucial when developing complex
chatbot functionalities. In summary, Visual Studio Code provides a versatile, efficient, and
collaborative development environment for building a talking healthcare chatbot using deep learning.
From code management and debugging to machine learning integration and deployment, VS Code’s
features streamline every stage of chatbot development, ensuring that developers can focus on creating
an accurate, user-friendly, andethical chatbot.
import random
import json
import pickle
import nltk
from nltk.stem import WordNetLemmatizer
from tensorflow.keras.models import load_model
import numpy as np
import speech_recognition as sr
import pyttsx3
import time
15
lemmatizer = WordNetLemmatizer()
intents = json.loads(open("intents.json").read())
def clean_up_sentence(sentence):
sentence_words = nltk.word_tokenize(sentence)
sentence_words = [lemmatizer.lemmatize(word)
for word in sentence_words]
return sentence_words
def bag_of_words(sentence):
sentence_words = clean_up_sentence(sentence)
bag = [0] * len(words)
for w in sentence_words:
for i, word in enumerate(words):
if word == w:
bag[i] = 1
return np.array(bag)
def predict_class(sentence):
bow = bag_of_words(sentence)
res = model.predict(np.array([bow]))[0]
ERROR_THRESHOLD = 0.25
return_list = []
for r in results:
return_list.append({'intent': classes[r[0]],
'probability': str(r[1])})
return return_list
result = ''
for i in list_of_intents:
if i['tag'] == tag:
result = random.choice(i['responses'])
16
break
return result
recognizer = sr.Recognizer()
mic = sr.Microphone()
engine = pyttsx3.init()
rate = engine.getProperty('rate')
engine.setProperty('rate', 175)
voices = engine.getProperty('voices')
"""User Might Skip the following Part till the start of While Loop"""
engine.say(
"Hello user, I am Bagley, your personal Talking Healthcare Chatbot.")
engine.runAndWait()
engine.say(
"IF YOU WANT TO CONTINUE WITH MALE VOICE PLEASE\
SAY MALE. OTHERWISE SAY FEMALE.")
engine.runAndWait()
17
audio = recognizer.listen(source)
audio = recognizer.recognize_google(audio)
# If the user says Female then the bot will speak in female voice.
if audio == "Female".lower():
engine.setProperty('voice', voices[1].id)
print("You have chosen to continue with Female Voice")
else:
engine.setProperty('voice', voices[0].id)
print("You have chosen to continue with Male Voice")
engine.say(
"Scanning our database for your symptom. Please wait.")
engine.runAndWait()
time.sleep(1)
18
voice = recognizer.listen(ans)
final = recognizer.recognize_google(voice)
19
},
{
"tag": "urinary_tract_infection",
"patterns": ["burning sensation during urination", "frequent urge to urinate", "cloudy urine"],
"responses": ["Your symptoms are consistent with a urinary tract infection."]
},
{
"tag": "arthritis",
"patterns": ["joint pain", "stiffness", "swelling in joints"],
"responses": ["You may be experiencing arthritis."]
},
{
"tag": "allergies",
"patterns": ["itchy eyes", "sneezing", "runny nose"],
"responses": ["Your symptoms indicate you may have allergies."]
},
{
"tag": "gastroesophageal_reflux_disease",
"patterns": ["heartburn", "regurgitation", "chest pain after eating"],
"responses": ["You may have gastroesophageal reflux disease (GERD)."]
},
{
"tag": "anemia",
"patterns": ["fatigue", "pale skin", "shortness of breath"],
"responses": ["According to your symptoms, you may have anemia."]
},
{
"tag": "covid-19",
"patterns": ["fever", "cough", "loss of taste or smell"],
"responses": ["Your symptoms might indicate COVID-19. Please consider testing and consulting a healthcare
provider."]
},
{
"tag": "chickenpox",
"patterns": ["itchy red spots", "fever", "fatigue"],
"responses": ["Your symptoms suggest you may have chickenpox."]
},
{
"tag": "eczema",
"patterns": ["dry, itchy skin", "red patches", "skin inflammation"],
"responses": ["Your symptoms are consistent with eczema."]
},
{
"tag": "obesity",
"patterns": ["excessive weight gain", "difficulty losing weight", "low energy levels"],
"responses": ["Your symptoms may indicate obesity. Consider consulting a healthcare provider."]
},
{
"tag": "hypothyroidism",
"patterns": ["fatigue", "weight gain", "cold intolerance"],
"responses": ["Your symptoms are consistent with hypothyroidism."]
},
{
"tag": "hyperthyroidism",
"patterns": ["rapid heartbeat", "weight loss", "nervousness"],
20
"responses": ["You may be experiencing hyperthyroidism based on your symptoms."]
},
{
"tag": "food_poisoning",
"patterns": ["nausea", "vomiting", "stomach cramps after eating"],
"responses": ["Your symptoms suggest food poisoning."]
},
{
"tag": "dementia",
"patterns": ["memory loss", "difficulty thinking", "confusion"],
"responses": ["Your symptoms may be associated with dementia."]
},
{
"tag": "stroke",
"patterns": ["sudden weakness", "difficulty speaking", "numbness on one side of the body"],
"responses": ["Your symptoms may indicate a stroke. Seek emergency medical help if needed."]
},
{
"tag": "epilepsy",
"patterns": ["recurrent seizures", "loss of consciousness", "uncontrollable jerking movements"],
"responses": ["According to your symptoms, you may have epilepsy."]
},
{
"tag": "irritable_bowel_syndrome",
"patterns": ["abdominal pain", "bloating", "diarrhea or constipation"],
"responses": ["You may have irritable bowel syndrome (IBS) based on your symptoms."]
},
{
"tag": "chronic_fatigue_syndrome",
"patterns": ["extreme fatigue", "sleep issues", "difficulty concentrating"],
"responses": ["Your symptoms indicate you may have chronic fatigue syndrome."]
},
{
"tag": "liver_disease",
"patterns": ["jaundice", "abdominal swelling", "nausea"],
"responses": ["Your symptoms are consistent with liver disease."]
},
{
"tag": "kidney_disease",
"patterns": ["swelling in legs", "fatigue", "frequent urination"],
"responses": ["You may have kidney disease according to your symptoms."]
},
{
"tag": "psoriasis",
"patterns": ["red patches on skin", "scaly skin", "itchiness"],
"responses": ["Your symptoms are consistent with psoriasis."]
},
{
"tag": "lung_cancer",
"patterns": ["persistent cough", "chest pain", "shortness of breath"],
"responses": ["Your symptoms suggest you may have lung cancer. Consider consulting a healthcare
provider."]
}
]
}
21
5.3 FLOW CHART
The above flowchart gives the brief about Sequential process of Talking Healthcare Chatbot
Using Deep Learning.
Steps Involved:
1. Collecting of Patient Data
2. Preprocessing the Data
3. Train the Model
4. Make Prediction
22
CHAPTER-6
TESTING AND VALIDATION
6.1 INTRODUCTION:
Testing is a procedure, a talking healthcare chatbot built with deep learning is essential to ensure its
accuracy, reliability, user-friendliness, and ethical compliance. This involves multiple levels of testing
to validate that the model, functionality, and outputs meet user needs and regulatory standards.
NLP Pipeline Testing: Verify that each step in the natural language processing pipeline (e.g.,
tokenization, lemmatization, and intent recognition) functions correctly. Ensure that inputs are
processed accurately into the correct format.
Speech Recognition and Text-to-Speech: Test components responsible for converting spoken
language to text and vice versa. Ensure that speech recognition accuracy is high for common
queries, and check that text-to-speech responses are clear.
Model Input/Output Validation: Test that the model correctly accepts preprocessed inputs (such
as tokenized words) and provides outputs in the expected format (probability arrays, intent
classes).
End-to-End Pipeline Testing: Test the entire input-to-output workflow by feeding sample user
queries, running them through the NLP and model prediction stages, and checking that the
responses are accurate.
3. Performance Testing
Response Time Testing: Measure the chatbot's response time from the moment a user query is
received to when the response is generated. Ensure that it meets acceptable limits for user
interaction, ideally under a few seconds.
23
Load Testing: Simulate multiple concurrent users to ensure the chatbot can handle heavy loads
without lag or crashing. This can be done using tools like JMeter to evaluate performance under
stress.
Latency Testing for Speech: Test response latency for voice-based inputs and outputs to ensure
that delays in speech recognition or text-to-speech synthesis do not disrupt the user experience.
Intent Classification Accuracy: Test the model’s ability to accurately classify intents. This
involves feeding labeled test cases into the model and checking how accurately it predicts the
correct intent.
A Test approach is the test system usage of a venture, characterizes how testing would be done. The
decision of test methodologies or test technique is a standout amongst the most intense factor in the
achievement of the test exertion and the precision of the test designs and gauges. Testing should be
possible in two ways
1. Bottom-up approach
2. Top-down approach
Bottom-up Approach:
Testing can be performed beginning from littlest and most reduced level modules and continuing
each one in turn. In this approach testing is directed from sub module to primary module , if the
fundamental module is not built up a transitory program called DRIVERS is utilized to recreate the
principle module . At the point when base level modules are tried consideration swings to those on
the following level that utilization the lower-level ones they are tried exclusively and afterward
connected with the already inspected bring down level modules.
24
Top-down Approach:
In this approach testing is directed from fundamental module to sub module. in the event that the
sub module is not built up an impermanent program called STUB is utilized for mimic the sub
module . This sort of testing begins from upper level modules. Since the nitty gritty exercises more
often than not performed in the lower level schedules are not given stubs are composed . A stub is
a module shell called by upper level module and that when achieved legitimately will restore a
message to the calling module demonstrating that appropriate association happened.
6.3 VALIDATION:
The way toward assessing programming amid the improvement procedure or toward the finish of the
advancement procedure to decide if it fulfills determined business prerequisites . Approval Testing
guarantees that the item really addresses the customer's issues . It can likewise be characterized as to
exhibit that the item satisfies its proposed utilize when sent on proper condition . The framework has
been tried and actualized effectively and along these lines guaranteed that every one of the prerequisites
as recorded in the product necessities determination are totally satisfied.
25
CHAPTER-7
RESULTS
The results of this project depends on the Input parameters given by the patients for therespective
symptoms.
For Implementation of the code the below are the parameters i have given to the model as an example:
26
Fig 7.2 Parameter 2
Below is the Final output of the project which shows the predictions on symptoms recognized by the
chatbot through voice.
27
CHAPTER-8
CONCLUSION & FUTURE SCOPE
In conclusion, A deep learning-based talking healthcare chatbot has the potential to significantly enhance
healthcare access, providing timely, relevant information to users and assisting them in managing basic
health needs. By leveraging deep learning, such a chatbot can understand and interpret user inputs more
accurately, tailoring responses to individual needs and learning from interactions to improve over time.
Moreover, integrating voice interaction makes healthcare more accessible, especially for users with
literacy or vision challenges.
Despite these advantages, the chatbot must be designed with care to avoid overreach, ensuring that it
remains a supportive tool rather than a substitute for professional medical advice. Ethical considerations,
including data privacy, bias mitigation, and responsible AI, are essential to building user trust and
complying with healthcare standards. With accurate and empathetic responses, a well-designed chatbot
can become an effective companion in guiding users toward appropriate self-care or professional
consultation when needed.
The future scope of this project is highly promising. A talking healthcare chatbot powered by deep
learning has tremendous potential to improve accessibility, guide patients in managing health concerns,
and support preventive care. Through continual advancements, ethical design, and collaboration with
healthcare professionals, it can evolve to become a vital, trusted resource in digital health, extending
healthcare support to those who need it most.
28
CHAPTER-9
REFERENCES
29