Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

report on voice assistant, Summaries of Project Management

this project report desktop voice assistant

Typology: Summaries

2018/2019

Uploaded on 11/28/2021

rohit-kumar-sinha
rohit-kumar-sinha 🇮🇳

5

(1)

1 document

1 / 14

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Desktop Voice Assistant
Submitted in partial fulfillment of the requirements for the award of degree of
BACHELOR OF ENGINEERING IN
COMPUTER SCIENCE & ENGINEERING
Submitted to:
Kritika
Submitted By:
NAME: Rohit Kr. Sinha
UID: 19BCS2060
NAME: Vipul Kumar
UID: 19BCS2042
NAME: Kanwaljit Singh Khattra
UID: 19BCS2043
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
Chandigarh University, Gharuan
October 2021
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download report on voice assistant and more Summaries Project Management in PDF only on Docsity!

Desktop Voice Assistant

Submitted in partial fulfillment of the requirements for the award of degree of BACHELOR OF ENGINEERING IN COMPUTER SCIENCE & ENGINEERING Submitted to: Kritika Submitted By: NAME: Rohit Kr. Sinha UID: 19BCS NAME: Vipul Kumar UID: 19BCS NAME: Kanwaljit Singh Khattra UID: 19BCS DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Chandigarh University, Gharuan

October 2021

INTRODUCTION

We are living in world where we are always surrounded by technology and technology nowadays has become a necessity. In today's era almost all tasks are digitalized. We have Smartphone in hands and it is nothing less than having world at your finger tips. These days we aren't even using fingers. We just speak of the task and it is done. There exist systems with which we all are familiar where we just have to speak and the technology makes it possible to perform the same. The technology that helps in achieving such task is known as virtual assistant. It also supports specialized task such as booking a flight, or finding cheapest book online from various e commerce sites and then providing an interface to book an order are helping automate search, discovery and online order operations. Virtual Assistants are software programs that help you ease your day to day tasks, such as showing weather report, creating reminders, making shopping lists etc. They can take commands via text (online chat bots) or by voice. Voice based intelligent assistants need an invoking word or wake word to activate the listener, followed by the command. The wake word used for our project is DVIA. We have so many virtual assistants, such as Apple's Siri, Amazon's Alexa and Microsoft's Cortana. For this project, wake word was chosen DVIA. The software that we are building is designed to be used efficiently on desktops. Personal assistant software improves user productivity by managing routine tasks of the user and by providing information from online sources to the user. DVIA is effortless to use. Call the wake word DVIA followed by the command. And within seconds, it gets executed. Voice searches have dominated over text search. Web searches conducted via mobile devices have only just overtaken those carried out using a computer. Virtual assistants are turning out to be smarter than ever. Allow your intelligent assistant to make email work for you. Detect intent, pick out important information, automate processes, and deliver personalized responses. This project was started on the premise that there is sufficient amount of openly available data and information on the web that can be utilized to build a virtual assistant that has access to making intelligent decisions for routine user activities.

ACTIVITY DIAGRAM

Initially, the system is listening to everything. As it receives any wake up call it begins execution of the query that is given to it by calling query followed by wake up call DVIA. The received command is identified whether it is a questionnaire or a task to be performed. Specific action is taken accordingly. After the Question is being answered or the task is being performed, the system waits for another command. This loop continues unless it receives quit command. At that moment, it goes back to sleep.

CLASS DIAGRAM

The class user has 2 attributes command that it sends in audio and the response it receives which is also audio for a query. 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. It has various functions like automate Whatsapp, search, open apps, play music.

SEQUENCE DIAGRAM

For query response

The above sequence diagram shows how an answer asked by the user is being fetched from internet. The audio query is interpreted and analysed by the python packages. Then it is converted into text form and searches in the query section and finds the answer. It is then sent back to speaker, where it speaks the answer to user.

For task execution

The user sends command to virtual assistant in audio form. The command is passed to the interpreter. It identifies what the user has asked and directs it to task executer. If the task is missing some info, the virtual assistant asks user back about it. The received information is sent back to task and it is accomplished. After execution feedback is sent back to user.

(40%) Project Implementation

Packages imported

import pyttsx

import speech_recognition as sr

import datetime

import pyaudio

import pywhatkit

import wikipedia

import webbrowser

import os

import smtplib

Example queries

CODE

import pyttsx3 #pip install pyttsx

import speech_recognition as sr #pip install speechRecognition

import datetime

import wikipedia #pip install wikipedia

import webbrowser

import os

import pyaudio

import smtplib

engine = pyttsx3.init('sapi5')

voices = engine.getProperty('voices')

# print(voices[1].id)

engine.setProperty('voice', voices[0].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!")

elif hour>=12 and hour<18:

speak("Good Afternoon!")

else:

speak("Good Evening!")

speak("I am DVIA Sir. Please tell me how may I help you")

def takeCommand():

#It takes microphone input from the user and returns string output

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("Say that again please...")

return "None"

return query

The user gives a command to open youtube to DVIA and it opens a

new tab in the google browser for youtube.

References

www.Stackoverflow.comwww.pythonprogramming.netwww.tutorialspoint.comYoutube :- Programming hero , Code with harry Python unofficial library