7 Python Report Eddd
7 Python Report Eddd
TITLE OF MICRO-PROJECT
CHAT BOT
Program: COMPUTER ENGINEERING Program Code: CO6I
Course: PROGRAMMING WITH PYTHON Course code: 22616
Group Details:
Sr.
No Name of Group members Roll No Enrollment No
Seal of
Institution
INDEX
Sr.
No Content Page No.
1 Project Proposal 01
2 Action plan 02
3 Resource required 02
4 Introduction 03
5 Actual Procedure 05
6 Output 08
7 Skill developed 09
8 Evaluation sheet 12
Annexure – I
Micro-Project Proposal
CHAT BOT
1
Downloaded by dream girl ([email protected])
lOMoARcPSD|34756506
2
Downloaded by dream girl ([email protected])
lOMoARcPSD|34756506
Annexure – II
Micro-Project Report
CHAT BOT
1.0 Rationale
Python is a powerful programming language. It has efficient high-level data structures and a
simple but effective approach to object-oriented programming. Python code is simple, short,
readable, intuitive, and powerful, and thus it is effective for introducing computing and
problem solving to beginners. Its elegant syntax and dynamic typing, together with its
interpreted nature, make it an ideal language for scripting and rapid application development
in many areas on most platforms.
3
Downloaded by dream girl ([email protected])
lOMoARcPSD|34756506
Exceptional handling:
Even if a statement or expression is syntactically correct, it may cause an error when
an attempt is made to execute it. Errors detected during execution are called
exceptions
These exceptions can be handled using the try statement
Since the try block raises an error, the except block will be executed.
4
Downloaded by dream girl ([email protected])
lOMoARcPSD|34756506
Algorithm:
Step 1: Start
Step 2: Install Python Libraries i.e. Chatterbot, chatterbot-corpus, pyttsx3, SpeechRecognition
5
Downloaded by dream girl ([email protected])
lOMoARcPSD|34756506
Flowchart:
6
Downloaded by dream girl ([email protected])
lOMoARcPSD|34756506
Code:
import logging
import pyttsx3
import speech_recognition as sr
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer
logging.basicConfig(level=logging.CRITICAL)
chatbot = ChatBot('TalkingBot')
def speech_to_Text():
r = sr.Recognizer()
try:
recognised_text = r.recognize_google(text)
print("You: ", recognised_text)
return recognised_text
except sr.UnknownValueError:
print("Unknown Error")
except sr.RequestError as e:
print("Request Error")
def text_to_Speech(res):
engine = pyttsx3.init()
rate = engine.getProperty('rate')
engine.setProperty('rate', 150)
engine.say(res)
engine.runAndWait()
# Calling function
while True:
st = speech_to_Text()
response = chatbot.get_response(st)
7
Downloaded by dream girl ([email protected])
lOMoARcPSD|34756506
1. Desktop pc – Windows 7 ✓
8
Downloaded by dream girl ([email protected])
lOMoARcPSD|34756506
9
Downloaded by dream girl ([email protected])
lOMoARcPSD|34756506
Annexure – III
11
Downloaded by dream girl ([email protected])
lOMoARcPSD|34756506
Annexure – IV
A. Process and Product Assessment (Convert Above Total marks out of 6 Marks)
2 Information Collection
5 Quality of Prototype/Model
6 Report Preparation
7 Presentation
8 Defense
12
Downloaded by dream girl ([email protected])
lOMoARcPSD|34756506
Total
Roll Process and Product Assessment Individual Presentation / Viva
Marks
No. (6 Marks) (4 Marks)
10
07
Dated Signature:
13