Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

Project Report Format

1. Project cover page


2. Certificate
3. Institute Vision, Institute Mission, Department Vision, Department Mission
4. Program Educational Objectives, Program Specific Objectives
5. Project PO/PSO Attainment Sheet
6. Acknowledgement
7. Index
8. Contents of Project
1. Abstract
2. Introduction
3. System Requirements
 Hardware & Software requirements.
4. Technologies
5. Architecture of Project
6. Modules developed.
7. Graphical User interface & Source code
8. Database (if applicable)
9. Output
10. Advantage and Disadvantages
11. Future Scope
12. Paper published and certificate
13. Conclusion
14. Bibliography

Title 18 Bold Times new


roman
Heading 14 Bold Times new
roman
Abstract 12 Italic bold Times new
roman
Subheading 12 Bold Times new
roman
Content 12 Normal Times new
roman
Figure name 11 Normal Times new
roman
MINI PROJECT – I REPORT

ON

“VOICE ASSISTANT USING PYTHON”


A Mini Project- I report submitted in partial fulfillment of the requirement for
the award of Degree of

Bachelor of Technology

(Fifth Semester)

In
COMPUTER SCIENCE & ENGINEERING
Session 2023-2024
Prescribed By
DBATU University, Lonere

Guided By Submitted By
Prof.Rakhi shende Mr.Sanghdip Udrake(CSEC511)
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
RAJIV GANDHI COLLEGE OF ENGINEERING
RESEARCH & TECHNOLOGY,
CHANDRAPUR.
Session 2023-2024

CERTIFICATE
This is to certify that, Mr.Sanghdip Udrake Studying in Fifth Semester
Department of COMPUTER SCIENCE & ENGINEERING,

have completed the Mini project - I

“VOICE ASSISTANT USING PYTHON”

satisfactorily during the Academic Session 2023-2024 from Rajiv Gandhi


College of Engineering Research & Technology, Chandrapur.

Project Guide Mini-Project in-charge


(Prof.Rakhi Shende) (Prof.Madhavi Sadhu)
----------------------- -----------------------------

Dr. Nitin Janwe


H.O.D.
CSE RCERT, Chandrapur
Rajiv Gandhi College of Engineering Research &
Technology, Chandrapur
Department of Computer Science & Engineering

Institute Vision

To be on forefront to impart quality education to address societal and industrial


needs and imbibe career skills through perseverance and practice.

Institute Mission

M1. To adapt innovative student centric learning methods based on


understanding and practice.

M2.To enhance professional and entrepreneurial skills.

M3.To motivate students to meet dynamic needs of the society with novelty and
creativity.

M4.To promote research and continuing education to keep the country ahead.

M5.To promote the mindset to acquire local solutions to local problems


(LS2LP).

Department Vision
To be a centre of excellence in Computer Science & Engineering by imparting
knowledge, professional skills and human values.
Department Mission
M1. To create encouraging learning environment by adapting innovative
student centric learning methods promoting quality education and
research.
M2. To make students competent professionals and entrepreneurs by
imparting career skills and ethics.
M3. To impart quality industry oriented education through industrial
internships, industrial projects and partnering with industries to make
students corporate ready.
Rajiv Gandhi College of Engineering Research &
Technology, Chandrapur
Department of Computer Science & Engineering

Program Educational Objectives


PEO1: Impart quality industry oriented education, strong fundamentals and
problem solving approach through student centric learning methods for
product development and handle real time problems.
PEO2: Possess good communication skills and ethics in line with corporate
environments to serve the industry & society.
PEO3: Create Competent Professionals & entrepreneurs by imparting Career
skills, leadership qualities and research

Program Specific Outcomes:

PSO1: Foundation of Computer System: Ability to understand the principles


and working of computer systems. Students can assess the hardware and
software aspects of computer systems.

PSO2: Foundations of Software development: Ability to understand the


structure and development methodologies of software systems. Possess
professional skills and knowledge of software design process.
Familiarity and practical competence with a range of programming
languages and platforms like Cloud Computing, Web based and Mobile
applications, Image and Video Processing, Artificial Intelligence &
Machine Learning.

PSO3: Foundation of mathematical concepts: Ability to apply mathematical


methodologies to solve computational tasks, model real world problems
using appropriate data structures and suitable algorithms.
Rajiv Gandhi College of Engineering Research & Technology,
Chandrapur
Department of Computer Science & Engineering

Project Title:Voice Assistant Using Python

Project PO/ PSO Attainment

PO/PSO Description
Attainment
(level1=low,2=
moderate,3=High)
PO1
PO2
PO3
PO4
PO5
PO6
PO7
PO8
PO9
PO10
PO11
PO12
PSO1
PSO2
PSO3

Signature of Project Guide


Acknowledgement

I hereby declare that this submission is our own work and that to the best of our
knowledge and beliefs. It contains no material l previously published or written by neither
any person nor materialwhich to a substance till extent has been accepted for the award of
any other degree or diploma ofthe university or other institute of higher learning, except
here due acknowledgement has been made in the text.

Signature:______________

Name: Sanghdip Udrake


Roll No: CSEC511
Index

SR.NO CONTENT

1. Abstract

2. Introduction

3. System Requirement

4. Architecture of Project

5. Modules developed

6. Graphical User Interface & Source Code

7. Database

8. Output

9.
Advantages & Disadvantages

10.
Future Scope

11.
Conclusion

12.
Bibliography
ABSTRACT

The "Voice Assistant Using Python" project presents the development and implementation
of a versatile voice-controlled assistant leveraging Python programming language and
associated libraries. The objective of this project was to create an interactive and intuitive
system capable of performing various tasks through voice commands, aiming to enhance
user convenience and efficiency.

The project utilized Python's libraries such as speech recognition, natural language
processing, and text-to-speech conversion to enable seamless interaction between users and
the voice assistant. The assistant was designed to interpret spoken commands, process
natural language, and execute corresponding actions, including retrieving information,
managing tasks, controlling applications, and performing basic tasks based on user
instructions.

The development process involved the integration of speech recognition algorithms to


comprehend and interpret user inputs, followed by the implementation of intelligent
responses and actions using Python's libraries. Additionally, the project incorporated
continuous improvement mechanisms to enhance the assistant's accuracy, responsiveness,
and functionality.

The report details the methodology, tools, and techniques employed in the development of
the voice assistant, along with insights gained during the implementation phase. Results
include the successful creation of a functional voice-controlled assistant capable of
executing a range of predefined tasks based on voice commands, showcasing the potential
for further enhancements and future applications in the domain of voice-based user
interfaces.

This project not only demonstrates the capabilities of Python for creating interactive voice-
controlled systems but also underscores the possibilities of integrating such technology into
daily tasks, thereby contributing to the evolution of user-friendly, voice-enabled
applications.
INTRODUCTION

In recent years, advancements in natural language processing (NLP) and speech recognition
technologies have led to the proliferation of voice-controlled systems, revolutionizing
human-computer interactions. The "Voice Assistant Using Python" project represents an
exploration into the creation and implementation of a sophisticated voice-controlled assistant
using the versatile capabilities of the Python programming language.

The primary goal of this project was to develop an intuitive and responsive voice assistant
capable of understanding natural language commands and executing various tasks, thereby
providing users with a seamless and interactive experience. Harnessing the power of Python
and leveraging its libraries, this project sought to bridge the gap between human speech and
machine actions, aiming to simplify daily tasks and enhance user convenience.

The proliferation of voice-enabled devices and the increasing demand for hands-free
interactions in various domains have underscored the importance of developing intelligent
voice-controlled systems. This project aligns with this trend by focusing on the integration of
speech recognition, natural language understanding, and text-to-speech capabilities to create
an efficient and adaptable voice assistant.

The report aims to provide a comprehensive overview of the methodologies, tools, and
processes employed in the development of the voice assistant. It outlines the challenges
encountered, the strategies implemented, and the outcomes achieved during the course of
designing, coding, and refining the system.

Moreover, the project report delves into the significance of utilizing Python for such
applications, highlighting its flexibility, extensive libraries, and ease of implementation in
building sophisticated voice-controlled systems. Additionally, it explores the potential
applications and implications of voice assistants in various fields, emphasizing the
significance of human-computer interaction through natural language.

Through this project, we aim to contribute to the growing landscape of voice-controlled


systems and demonstrate the practicality and innovation possible through the integration of
Python programming in creating intelligent and user-centric applications.
SYSTEM REQUIREMENTS

HARDWARE REQUIREMENTS:

 System : Pentium i3 Processor.


 Hard Disk : 500 GB.
 Monitor : 15’’ LED
 Input Devices : Keyboard, Mouse
 Ram : 4 GB

SOFTWARE REQUIREMENTS:

 Operating system : Windows 10


 Coding Language : Python 3.12.0

Integrated Development Enviornment(IDE):

 Pycharm
 Jupiter Notebook
 Visual Studio Code

Speech Recognition Library:


 pip install SpeechRecognition

Text-To-Speech:
 pip install pyttsx3
 Natural Language Processing (NLP) Libraries

Additional Libraries and APIs:


 Google API
 Wikipedia API
 Weather API
 Other APIs
ARCHITECTURE OF PROJECT
MODULES DEVELOPED

1. Speech Recognition Module:


This module deals with capturing and interpreting spoken language.
Functions:
-Capture audio input from the user.
-Use speech recognition libraries to convert speech to text.
Example Libraries: `SpeechRecognition`, `pyttsx3` for text-to-speech conversion.

2. Natural Language Processing (NLP) Module:


Responsible for understanding user commands and queries.
Functions:
-Analyze and parse user input for intents and entities.
-Use NLP libraries like `NLTK`, `spaCy`, or `gensim` for language processing tasks.

3. Command Execution Module:


This module processes interpreted commands and executes corresponding actions.
Functions:
- Define actions based on recognized user commands.
- Implement functionalities like retrieving information from databases or APIs.

4. User Interface Module:


Handles the interaction between the user and the voice assistant.
Functions:
- Manage input/output mechanisms.
- Provide user-friendly interactions via text-to-speech and speech-to-text functionalities.

5. Integration Modules (Optional):


Additional modules to integrate external services or APIs.
Functions:
- Connect with external APIs for specific tasks (e.g., weather, news, calendar, etc.).
- Implement functionalities to retrieve and process information from external sources.

6. Database/Storage Module (Optional):


If your assistant requires memory or storage for user preferences, settings, or data retrieval.
Functions:
- Store user preferences, history, or frequently accessed data.
- Retrieve and manage stored information for personalized interactions.
GRAPHICAL USER INTERFACE & SOURCE CODE

import subprocess
import wolframalpha
import pyttsx3
import tkinter
import json
import random
import operator
import speech_recognition as sr
import datetime
import wikipedia
import webbrowser
import os
import winshell
import pyjokes
import feedparser
import smtplib
import ctypes
import time
import requests
import shutil
from twilio.rest import Client
from clint.textui import progress
from ecapture import ecapture as ec
from bs4 import BeautifulSoup
import win32com.client as wincl
from urllib.request import urlopen

engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[1].id)

def speak(audio):
engine.say(audio)
engine.runAndWait()

def wishMe():
hour = int(datetime.datetime.now().hour)
if hour>= 0 and hour<12:
speak("Good Morning Sir !")

elif hour>= 12 and hour<18:


speak("Good Afternoon Sir !")

else:
speak("Good Evening Sir !")

assname =("Jarvis 1 point o")


speak("I am your Assistant")
speak(assname)

def username():
speak("What should i call you sir")
uname = takeCommand()
speak("Welcome Mister")
speak(uname)
columns = shutil.get_terminal_size().columns

print("#####################".center(columns))
print("Welcome Mr.", uname.center(columns))
print("#####################".center(columns))

speak("How can i Help you, Sir")

def takeCommand():

r = sr.Recognizer()

with sr.Microphone() as source:

print("Listening...")
r.pause_threshold = 1
audio = r.listen(source)

try:
print("Recognizing...")
query = r.recognize_google(audio, language ='en-in')
print(f"User said: {query}\n")

except Exception as e:
print(e)
print("Unable to Recognize your voice.")
return "None"

return query

def sendEmail(to, content):


server = smtplib.SMTP('smtp.gmail.com', 587)
server.ehlo()
server.starttls()

# Enable low security in gmail


server.login('your email id', 'your email password')
server.sendmail('your email id', to, content)
server.close()
OUTPUT

Listening...
Recognizing...
User said: Sameer

#####################
Welcome Mr. Sameer

#####################
Listening...
Recognizing…
Unable to Recognizing your voice.
Listening...
Recognizing…
User said: Himalaya in Wikipedia

The Himalayas, or Himalaya (; Sanskrit: [ɦɪmaːlɐjɐ]; from Sanskrit himá 'snow, frost',
and ā-laya 'dwelling, abode'), is a mountain range in Asia, separating the plains of the
Indian subcontinent from the Tibetan Plateau. The range has some of the Earth's
highest peaks, including the highest, Mount Everest; more than 100 peaks exceeding
elevations of 7,200 m (23,600 ft) above sea level lie in the Himalayas.
The Himalayas abut or cross five countries: Nepal, China, Pakistan, Bhutan and India.
#####################
Listening...
Recognizing...
User said: lock window
ADVANTAGES

Voice assistant projects offer several advantages:

1. Convenience and Hands-Free Operation:


Users can perform tasks or access information using voice commands, eliminating the need
for manual input and enabling hands-free interaction.
2. Accessibility:
Particularly beneficial for people with disabilities or those with limited mobility, providing an
alternative means of accessing technology and information.
3. Increased Productivity:
Voice assistants can automate tasks, set reminders, manage schedules, and perform various
functions swiftly, saving time and increasing efficiency.
4. Natural Interaction:
Enables a more natural and intuitive way of interacting with technology, simulating human-
like conversations for a more user-friendly experience.
5. Personalization and Contextual Understanding:
Advanced voice assistants can learn user preferences and provide personalized responses,
adapting to individual needs over time.
6. Multitasking Abilities:
Allows users to perform multiple tasks simultaneously, such as controlling smart home
devices while receiving weather updates or scheduling appointments.
7. Information Retrieval:
Voice assistants can quickly retrieve information from the internet, databases, or APIs,
offering instant answers to questions or queries.
8. Hands-Free Navigation:
Useful in vehicles or while performing activities where hands-free operation is essential, such
as cooking or exercising.
9. Entertainment and Assistance:
Offers entertainment options like playing music, telling jokes, providing news updates, or
acting as a personal assistant for various tasks.
10. Integration with Smart Devices:
Can control and manage various smart home devices, such as lights, thermostats, and security
systems, offering centralized control.
11. Continuous Improvement:
Voice assistants can learn and improve based on user interactions, leading to enhanced
accuracy and performance over time.
DISADVANTAGES

1. Privacy Concerns:
Voice assistants often collect and store user data, raising privacy concerns about the security
of personal information and potential misuse of data.
2. Accuracy and Reliability:
Voice recognition technology may not always accurately interpret commands, leading to
misunderstandings or incorrect actions. Additionally, reliability issues can arise due to
connectivity or technical glitches.
3. Lack of Contextual Understanding:
Voice assistants may struggle with understanding context or following complex instructions,
limiting their ability to perform sophisticated tasks accurately.
4. Limited Functionality:
While voice assistants can perform various tasks, their capabilities might be limited
compared to manual interactions or graphical interfaces, especially for complex or
specialized tasks.
5. Dependency and Overreliance:
Overreliance on voice assistants may lead to reduced critical thinking or problem-solving
skills, as users become accustomed to immediate answers and solutions.
6. Misinterpretation and Miscommunication:
Misinterpretation of commands or accidental activations may lead to unintended actions or
miscommunication, causing frustration for users.
7. Security Risks:
Vulnerabilities exist in voice assistant systems, potentially allowing unauthorized access or
exploitation by malicious actors, posing security risks.
8. Compatibility Issues:
Voice assistants might not be compatible with all devices or platforms, limiting their
integration or usage in certain environments.
9. Language and Accent Limitations:
Some voice assistants may struggle with understanding different accents, languages, or
dialects, hindering accessibility for diverse user groups.
10. Power Consumption:
Continuous listening or active voice recognition can consume device battery power, affecting
the device's battery life.
FUTURE SCOPE
1. Advanced Natural Language Processing (NLP):
Further development in NLP will enhance voice assistants' contextual understanding,
enabling more natural and human-like interactions.
2. Personalization and Context Awareness:
Voice assistants will evolve to become more personalized, adapting to individual user
preferences, behaviors, and contexts.
3. Multilingual Support and Accents:
Improved multilingual support and better understanding of diverse accents will enhance
accessibility and usability for a global audience.
4. Emotional Intelligence and Sentiment Analysis:
Integrating emotional intelligence into voice assistants to recognize emotions or sentiment in
speech could enable more empathetic and responsive interactions.
5. Integration with IoT and Smart Devices:
Deeper integration with Internet of Things (IoT) devices will allow voice assistants to control
and manage an even broader range of smart devices and systems.
6. Improved Security and Privacy Measures:
Future voice assistants will prioritize enhanced security features and robust privacy measures
to address growing concerns regarding data privacy and security.
7. Cross-Platform Integration:
Integration across multiple devices and platforms, offering seamless continuity of interactions
regardless of the device being used.
8. AI and Machine Learning Advancements:
Continued advancements in AI and machine learning will enable voice assistants to learn and
adapt dynamically, improving accuracy and performance.
9. Customization and Skill Development:
Empowering users to create custom skills or functionalities for their voice assistants,
allowing for a more personalized experience.
10. Business and Industry Applications:
Expansion of voice assistants into various industries, including healthcare, education, retail,
and more, to streamline processes and enhance user experiences.
11. Ethical and Responsible AI Development:
Emphasis on ethical AI development, addressing biases, ensuring fairness, and maintaining
transparency in voice assistant systems.
12. Augmented Reality (AR) and Virtual Reality (VR) Integration:
Integration with AR/VR technologies could extend voice assistants' capabilities, providing
more immersive and interactive experiences.
CONCLUSION

The development and implementation of the "Voice Assistant Using Python" project mark a
significant stride in leveraging technology to redefine human-computer interactions.
Throughout this project, we have explored the capabilities of Python and its associated
libraries in creating a versatile and intuitive voice-controlled assistant, aiming to simplify
tasks and enhance user experiences.

The project's journey involved integrating speech recognition, natural language processing,
and text-to-speech functionalities to bridge the gap between spoken commands and
actionable tasks. Despite challenges such as accuracy limitations and privacy concerns, the
voice assistant showcases immense potential for revolutionizing how individuals interact with
technology.

Our exploration highlighted the importance of continuous innovation and refinement in


enhancing the assistant's capabilities. As technology evolves, opportunities for improving
contextual understanding, personalization, and seamless integration across devices and
platforms emerge, presenting an exciting roadmap for future developments in voice assistants.

The significance of ethical AI development and user-centric design cannot be overstated. As


we move forward, we must prioritize ethical considerations, data privacy, and inclusivity to
ensure that voice assistants serve diverse user needs while maintaining transparency and trust.

In conclusion, the "Voice Assistant Using Python" project serves as a testament to the
capabilities of Python in creating intelligent and interactive systems. This project opens doors
to a future where voice assistants play a pivotal role in enhancing productivity, accessibility,
and convenience across various domains, paving the way for a more connected and efficient
technological landscape.
BIBLOGRAPHY

Python Libraries Documentation:


1.SpeechRecognition: Official documentation provides guidelines for speech recognition
integration.
2.pyttsx3: Documentation for text-to-speech conversion in Python.
NLTK (Natural Language Toolkit): Comprehensive documentation for natural language
processing tasks.
Tutorials and Guides:
Websites like Real Python, GeeksforGeeks, and Towards Data Science often feature tutorials
on building voice assistants using Python.
Books:
1."Natural Language Processing with Python" by Steven Bird, Ewan Klein, and Edward
Loper offers insights into NLP using Python.
2."Voice Application Development for Android" by Michael F. McTear and Zoraida Callejas
provides guidance on voice app development concepts.
GitHub Repositories:
1.Explore repositories like Uberi's SpeechRecognition and pyttsx3 for practical examples and
implementation ideas.
API Documentation:
If using external APIs (e.g., Google Cloud Speech-to-Text API, OpenWeatherMap API),
refer to their official documentation for integration guidelines.
Documentation for Specific Devices or Platforms:
If targeting a specific platform (e.g., Google Assistant SDK, Amazon Alexa Skills Kit),
refered to their official documentation and developer guides.

You might also like