0% found this document useful (0 votes)
24 views22 pages

CLG Project

The project report details the development of an AI-powered desktop assistant that utilizes natural language processing and machine learning to enhance user interaction with computers. It outlines the project's objectives, system analysis, design, testing, and coding, emphasizing the assistant's ability to learn user preferences and automate tasks. The report is submitted by a group of students from the University of Rajasthan under the guidance of Ms. Rina Sharma.

Uploaded by

sirh4210
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views22 pages

CLG Project

The project report details the development of an AI-powered desktop assistant that utilizes natural language processing and machine learning to enhance user interaction with computers. It outlines the project's objectives, system analysis, design, testing, and coding, emphasizing the assistant's ability to learn user preferences and automate tasks. The report is submitted by a group of students from the University of Rajasthan under the guidance of Ms. Rina Sharma.

Uploaded by

sirh4210
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

A Project Report On

“A.I. Desktop Assistant”

SProject report submitted in partial fulfillment of the requirement for the award
of the degree of Bachelor of Computer Application
Submitted By
Pushpendra vaishnav
Vivek pareek
Pushpendra sharma
Sayed rehman ali

SESSION : 2022-2025

Under the guidance of

Ms. Rina Sharma


Project Supervisor
Department of Computer Science
Maharishi Arvind School of Management Studies
Mansarovar, Jaipur
Department of Computer Science
University of Rajasthan, Jaipur

CERTIFICATE

This is certify that the project entitled “AI Desktop Assistant” being submitted by Mr.
pushpendra vaishnav, Mr.vivek pareek, Mr. pushpendra sharma, Mr. sayed
rehman ali in partial fulfilment for the award of the degree of Bachelor of Computer
Application to the University of Rajasthan is a record of bonafide work carried out by
himself under my guidance and supervision.

The result embodied in the project report have not been submitted to any other University or
institute for the award of any Degree or Diploma.

Internal Guide Head of the Department

Ms. Rina Sharma


Project supervisor

Department of CS
DECLARATION
This is to certify that tha work report in the present project entitled “AI Desktop
Assistant” is a record of work done by us in the Department of Computer Science,
MASMS Jaipur. The reports are based on the project work done entirely by us and
not copied from any other source.

Mr. Pushpendra vaishnav


Mr. Vivek pareek
Mr. Pushpendra sharma
Mr. Sayed rehman ali
ACKNOWLEDGEMENT

I would like to express my sincere gratitude and indebtedness to my project supervisor Ms. Rina
Sharma mam for her valuable suggestions and interest throughout the course of this project.

I am also thankful to Head of the department Mr. Sunil Chauhan sir for providing excellent
infrastructure and a nice atmosphere for completing this project successfully.

I convey my heartfelt thanks to the lab staff for allowing me to use the required equipment
whenever needed.

Finally, I would like to take this opportunity to thank my family for their support through the work.
I sincerely acknowledge and thank all those who gave directly or indirectly their support in
completion of this work.

Pushpendra vaishnav
Vivek pareek
Pushpendra sharma
Sayed rehman ali
TABLE OF CONTENT

TITLE PAGE NO.

Title Page I
Certificate II
Declaration III
Acknowledgement IV
Table of content V
Abstract VI

LIST OF CONTENT

I . INTRODUCTION
PROJECT AIM AND OBJECTIVES
BACKGROUND OF PROJECT
OPERATION ENVIRONMENT
II. SYSTEM ANALYSIS
SOFTWARE REQUIREMENT
SPECIFICATION

EXISTING VS PROPOSED
SOFTWARE TOOL USED
III. SYSTEM DESIGN
DATA FLOW DIAGRAM’S
IV. SYSTEM TESTING
UNIT TESTING
INTEGRATION TESTING
V. CODING
VI. CONCLUSION & FUTURE SCOPE

ABSTRACT

This project proposes the development of an AI-powered desktop assistant that utilizes
natural language processing (NLP) and machine learning (ML) algorithms to provide
users with a personalized and intuitive computing experience. The assistant will be
designed to learn and adapt to the user's habits and preferences over time, enabling it to
anticipate and fulfill their needs more effectively.

The desktop assistant will be capable of performing a wide range of tasks, including
playing music, writing emails, and providing information on demand. It will also be
integrated with various applications and services, such as Wikipedia, reminders, and
news feeds, to provide users with a seamless and comprehensive experience.

With its user-friendly interface and advanced AI capabilities, this desktop assistant aims
to revolutionize the way users interact with their computers. It will enable users to work
more efficiently and effectively, freeing them from mundane tasks and allowing them
to focus on more creative and strategic pursuits. Ultimately, this project has the potential
to transform the desktop computing experience, making it more personalized,
productive, and enjoyable for users.
CHAPTER 1

1. INTRODUCTION

1.1 PROJECT AIM AND OBJECTIVES


The aim of this project is to design and develop a voice assistant AI that can
understand and respond to voice commands, providing a convenient and hands-
free way to interact with devices and access information.

To develop a voice assistant AI that can recognize and respond to voice


commands with high accuracy.

To integrate the voice assistant AI with various devices and services to enable
seamless control and access.

To provide a user-friendly interface for users to interact with the voice assistant AI.

1.2 BACKGROUND PROCESS The


voice assistant AI will utilize a range of technologies, including:
Natural Language Processing (NLP): to analyze and understand the meaning of
text.
Continuous listening for voice commands.
Processing and analyzing voice commands to determine user intent. Executing
actions and providing responses to user requests.

1.3 OPERATION ENVIRONMENT The


AI Desktop Assistant will operate in a Windows-based environment, requiring a
minimum of 4GB RAM and 2.4GHz processor. It will be compatible with various
devices, including desktops, laptops, and tablets. The assistant will also integrate with
popular applications such as Microsoft Office, Google Chrome, and Mozilla Firefox.
Additionally, it will support various input methods, including voice, keyboard, and
mouse. The assistant will require a stable internet connection for cloud-based
processing and data storage.
CHAPTER 2

2 . SYSTEM ANALYSIS

In this chapter, we will discus and analyze about the developing process of AI
Desktop Assistant including software requirement specification (SRS) and
comparison between existing and proposed system.
The functional and non-functional requirements are included in SRS part to provide
complete description and overview of system requirement before the developing
process is carried out. Besides that, existing vs proposed provides a view of how the
proposed system will be more efficient than the existing one.

2.1 . Software Requirement Specification


The software requirement specification (SRS) outlines the functional and non- functional
requirements of the AI Desktop Assistant.

2.1.1 Functional Requirements


The system should be able to search for information on the browser.
The system should be able to open specific websites, such as YouTube.
The system should be able to tell the current time.
The system should be able to play music from the user's storage.
The system should be able to follow up on commands.
The system should be able to use OpenAI for specific commands.

2.1.2 Non-Functional Requirements


The system should be user-friendly and easy to interact with.
The system should be able to respond quickly to user commands.
The system should be able to learn and adapt to the user's preferences over time.
The system should be secure and protect the user's data.

2.2 Existing vs Proposed System


The existing system consists of manual searching and browsing, which can be
timeconsuming and inefficient. The proposed system, AI Desktop Assistant, aims
to automate these tasks and provide a more efficient and personalized experience.

2.2.1 Limitations of Existing System


Manual searching and browsing can be time-consuming and inefficient.
Users have to manually open websites and search for information.
Users have to manually play music and videos.
2.2.2 Advantages of Proposed System
Automates tasks, such as searching and browsing.
Provides a personalized experience based on the user's preferences.
Can learn and adapt to the user's behavior over time.
Can integrate with other devices and services.

2.3 Software Tool Used


The AI Desktop Assistant will be built using a combination of software tools and
technologies, including:

2.3.1 Natural Language Processing (NLP) Tools


NLTK (Natural Language Toolkit) for text processing and tokenization.

2.3.2 Machine Learning Tools


TensorFlow for building and training machine learning models. Scikit-
learn for implementing machine learning algorithms.

2.3.3 Integration Tools


API (Application Programming Interface) for integrating with other devices and services.
SDK (Software Development Kit) for integrating with other software applications.

2.3.4 OpenAI Integration


OpenAI API for integrating with OpenAI's language models and algorithms.

Note: The system is still in the development stage, and the tools and technologies used
may change or evolve over time.

CHAPTER 3
3 . SYSTEM DESIGN

3.1 ER DIAGRAM

The above diagram shows entities and their relationship for a AI Desktop assistant system.
We have a user of a system who can have their keys and values. It can be used to store any
information about the user. Say, for key “name” value can be “Vikas”. For some keys user
might like to keep secure. Single user can ask multiple questions. Each question will be
given ID to get recognized along with the query and its corresponding answer. User can
also be having n number of tasks. These should have their own unique id and status i.e.
play music, open youtube etc.

3.2 CLASS DIAGRAM

The class user has 2 attributes command that it sends in audio and the response it receives
which is also audio. It performs function to listen the user command. Interpret it and then
reply or sends back response accordingly. Question class has the command in string form
as it is interpreted by interpret class. It sends it to general or about or search function
based on its identification. The task class also has interpreted command in string format.
3.3 USE CASE DIAGRAM

In this project there is only one user. The user queries command to the system. System then
interprets it and fetches answer. The response is sent back to the user.
3.4 DATA FLOW DIAGRAM

CHAPTER 4
4 . SYSTEM TESTING
System testing is a crucial phase of the software development life cycle that ensures
the AI Desktop Assistant meets the requirements and works as expected. The goal of
system testing is to validate the entire system, including all its components and
interactions, to ensure it functions correctly and provides a high-quality user experience.

4.1 Unit Testing


Unit testing is a type of system testing that focuses on individual units or components
of the system. The goal of unit testing is to ensure that each unit functions correctly and
meets the requirements.

4.1.1 Unit Testing Objectives


To ensure that each unit functions correctly and meets the requirements.
To identify and fix defects early in the development cycle.
To ensure that each unit is testable and maintainable.

4.1.2 Unit Testing Techniques


Black box testing: testing the unit without knowing its internal workings.
White box testing: testing the unit with knowledge of its internal workings.
Gray box testing: testing the unit with some knowledge of its internal workings.

4.1.3 Unit Testing Tools


JUnit: a popular unit testing framework for Java.
PyUnit: a popular unit testing framework for Python.
NUnit: a popular unit testing framework for .NET.

4.2 Integration Testing


Integration testing is a type of system testing that focuses on integrating individual
units or components of the system. The goal of integration testing is to ensure that the
units work together seamlessly and provide a high-quality user experience.
4.2.1 Integration Testing Objectives
To ensure that the units work together seamlessly.
To identify and fix defects that occur when units are integrated.
To ensure that the system functions correctly and meets the requirements.

4.2.2 Integration Testing Techniques


Top-down integration: integrating units from top to bottom.
Bottom-up integration: integrating units from bottom to top.
Big bang integration: integrating all units at once.

4.2.3 Integration Testing Tools


Selenium: a popular integration testing framework for web applications.
Appium: a popular integration testing framework for mobile applications.
TestComplete: a popular integration testing framework for desktop applications.

CHAPTER 5

CODING
We used VS Code IDE in this project. It displays different panels below the editor
region for output or debug information, errors, and warnings, or an integrated
terminal. Additionally, the panel can also move to the right for more vertical space. VS
Code opens up in the same state it was last in, every time We start it. It also preserves
folder and opened files.

Defining Speak Function


The first and foremost thing for an A.I. assistant is that it should be able to speak. To
make our J.A.R.V.I.S. talk, we will make a function called speak(). This function will
take audio as an argument, and then it will pronounce it.

CODE OF THE DESKTOP AI ASSIATANT

The code of the program were divided into multiple parts like main file, where is the
main source code of the function which included all the parts of the program threw “
IMPORT ” function.

5.1 Main.py

import speech_recognition as sr
import os import webbrowser
import openai
from config import apikey
import datetime import
random # import numpy
as np

chatStr = "" def


chat(query):
global chatStr
print(chatStr)
openai.api_key = apikey chatStr +=
f"Vikas: {query}\n Jarvis: " response =
openai.Completion.create(
model="text-davinci-003", prompt=
chatStr, temperature=0.7,
max_tokens=256,
top_p=1,
frequency_penalty=0,
presence_penalty=0
)
# todo:
say(response["choices"][0]["text"])
chatStr += f"{response['choices'][0]['text']}\n"
return response["choices"][0]["text"]

def ai(prompt):
openai.api_key = apikey
text = f"OpenAI response for Prompt: {prompt} \n write an email for me to salary
increment \n\n"

response = openai.Completion.create(
model="text-davinci-003",
prompt=prompt, temperature=0.7,
max_tokens=256,
top_p=1,
frequency_penalty=0,
presence_penalty=0
)
# todo:
text += response["choices"][0]["text"]
if not os.path.exists("Openai"):
os.mkdir("Openai")

# with open(f"Openai/prompt- {random.randint(1, 2343434356)}", "w") as f:


with open(f"Openai/{''.join(prompt.split('intelligence')[1:]).strip() }.txt", "w") as f:
f.write(text)
def say(text):
os.system(f'say "{text}"')

def takeCommand():
r = sr.Recognizer() with
sr.Microphone() as source: #
r.pause_threshold = 0.6 audio
= r.listen(source) try:
print("Recognizing...")
query = r.recognize_google(audio, language="en-in")
print(f"User said: {query}")
return query except Exception as e:
return "Some Error Occurred. Sorry from Jarvis"

if __name__ == '__main__':
print('Welcome to Jarvis A.I')
say("Jarvis") while True:
print("Listening...")
query = takeCommand() #
todo: Add more sites
sites = [["youtube", "https://www.youtube.com"], ["wikipedia",
"https://www.wikipedia.com"], ["google", "https://www.google.com"],]
for site in sites:
if f"Open {site[0]}".lower() in query.lower():
say(f"Opening {site[0]} sir...")
webbrowser.open(site[1])
# todo: Add a feature to play a specific song
if "open music" in query:
musicPath = " /C:/Users/ok/Music/dailygt650_14031121_100701592.mp3"
os.system(f"open {musicPath}")

elif "the time" in query:


hour = datetime.datetime.now().strftime("%H")
min = datetime.datetime.now().strftime("%M")
say(f"Sir time is {hour} bajke {min} minutes")

elif "open facetime".lower() in query.lower(): os.system(f"open


/System/Applications/FaceTime.app")

elif "open pass".lower() in query.lower(): os.system(f"open


/Applications/Passky.app")

elif "Using artificial intelligence".lower() in query.lower():


ai(prompt=query)

elif "Jarvis Quit".lower() in query.lower(): exit()

elif "reset chat".lower() in query.lower():


chatStr = ""
else:
print("Chatting...") chat(query)

# say(query)

5.2 audio.py
This file holds source code of audio feature.

import win32com.client

speaker = win32com.client.Dispatch("SAPI.SpVoice")

while 1: print("Enter the word you want to speak it out by


computer") s = input() speaker.Speak(s)
5.3 config.py
This file holds API key for open AI.
# todo: Add your api key here
apikey = "Your-Open-AI-Key"

5.4 openaitest.py
This file holds the source code of the OPEN AI.
OPEN AI is a powerful AI source which also do many things following the commands by
the user.
OPEN AI is the largest AI network and most secure or more reliable and fastest AI in the
market.

import os import
openai
from config import apikey

openai.api_key = apikey

response = openai.Completion.create( model="text-davinci-


003",
prompt="Write an email to my boss for resignation?",
temperature=0.7, max_tokens=256, top_p=1,
frequency_penalty=0,
presence_penalty=0
)

print(response)
'''
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": "\n\nSubject: Resignation\n\nDear [Vikas],\n\nI am writing to inform you
of my intention to resign from my current position at [Company]. My last day of
work will be [date].\n\nI have enjoyed my time at [Company], and I am grateful for
the opportunity to work here. I have learned a great deal during my time in this
position, and I am grateful for the experience.\n\nIf I can be of any assistance during
this transition, please do not hesitate to ask.\n\nThank you for your
understanding.\n\nSincerely,\n[Vikas]"
}
],
"created": 1683815400,
"id": "cmpl-7F1aqg7BkzIY8vBnCxYQh8Xp4wO85",
"model": "text-davinci-003",
"object": "text_completion",
"usage": {
"completion_tokens": 125,
"prompt_tokens": 9,
"total_tokens": 134
}
}

'''

Is it an A.I.?
Many people will argue that the virtual assistant that we have created is not an A.I, but
it is the output of a bunch of the statement. But, if we look at the fundamental level, the
sole purpose of A.I develop machines that can perform human tasks with the same
effectiveness or even more effectively than humans. It is a fact that our virtual assistant
is not a very good example of A.I., but it is an A.I. !
CHAPTER 6

6.1 CONCLUSION
Through this AI Desktop assistant, we have automated various services using a
single line command. It eases most of the tasks of the user like searching the web,
retrieving weather forecast details, vocabulary help and medical related queries. We
aim to make this project a complete server assistant and make it smart enough to act as
a replacement for a general server administration. The future plans include integrating
Jarvis with mobile using React Native to provide a synchronised experience between
the two connected devices. Further, in the long run, Jarvis is planned to feature auto
deployment supporting elastic beanstalk, backup files, and all operations which a
general Server Administrator does. The functionality would be seamless enough to
replace the Server Administrator with Jarvis.

6.2 FUTURE SCOPE


The future scope of the AI Desktop Assistant project is vast and promising. Potential
enhancements include integrating with IoT devices, expanding voice recognition
capabilities, and incorporating augmented reality features. Additionally, the assistant
could be developed into a mobile app, allowing users to access its features on-the-go.
Further integration with other AI-powered tools and services could also enhance its
capabilities. With continuous updates and improvements, the AI Desktop Assistant has
the potential to revolutionize the way we interact with our computers.

You might also like