Sei sulla pagina 1di 15

MINOR PROJECT REPORT

PYTHON WITH MACHINE LEARNING

Submitted in partial fulfillment of the


Requirements for the award of
Degree of Bachelor of Technology in Computer Science

NNN

Submitted By

Name: Prabin Tharu


Name: Pawas Mishra
Name: Geeta Sharma
Name: Jatin Thapa

SUBMITTED TO: Sachin Chauhan

Department of Computer Science


PHONICS GROUP OF INSTITUTIONS
IMLIKHERA, ROORKEE
DECLARATION

I hereby declare that the Industrial Training Report entitled PYTHON WITH ML is an
authentic record of my own work as requirements of Industrial Training during the period from
to_______ for the award of degree of B.Tech. (Computer Science), Phonics Group Of
Institutions, Roorkee, under the guidance of Mr. Sachin Chauhan.

Pawas Mishra
160570101017

Date: ____________________
Acknowledgement
During my internship period, the staffs at Able infotech and persons guiding me were very
helpful and extended their valuable guidance and help whenever required for the projects which
I worked on.

I am very thankful to my guide or team leader Mr. Vivek Kumar Singh for his invaluable
guidance and advice during my training period. I also thank to Mr. Ashok Pant who helped me
how to communicate with other people and generate the ideas that the company refers too.

My team taught me, guided me in the way that I learn all these things such as python console
uses, modules applications , in the beautiful way. Overall, the above team made my stay at
Able Infotech an enjoyable one and I consider myself as a very lucky individual as I was
provided with an opportunity to a part of it. I am also grateful for having a chance to meet so
many wonderful people and professionals who led me through this training period.
CONTENTS

 Declaration Page 03

 Acknowledgement Page 04

 Introduction of Python Page

 List of Images Page

 Modules Page

Page


Page


Page

Page

 Conclusion Page
INTRODUCTION
OF
PYTHON

What is Python?

 Python is a popular programming language. It was created by Guido van


Rossum , and released in 1991
.
It is used for:-
1. web development (server-side),
2. software development,
3. mathematics,
4. system scripting.

What can Python do?

 Python can be used on a server to create web applications.


 Python can be used alongside software to create workflows.
 Python can connect to database systems. It can also read and modify files.
 Python can be used to handle big data and perform complex mathematics.
 Python can be used for rapid prototyping, or for production-ready software
development

Why Python?
 Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
 Python has a simple syntax similar to the English language.
 Python has syntax that allows developers to write programs with fewer lines
than some other programming languages.
 Python runs on an interpreter system, meaning that code can be executed as
soon as it is written. This means that prototyping can be very quick.
 Python can be treated in a procedural way, an object-orientated way or a
functional way.

A Simple Program to print “ Hello World!”


JAVA Python
Public class HelloWorld print(“Hello World!”)
{
Public static void main(String args())
{
System.Out.println(“Hello World!”)
}
}

Python Libraries
We know that a module is a file with some Python code, and a package is a directory for sub
packages and modules. But the line between a package and a Python library is quite blurred.

A Python library is a reusable chunk of code that you may want to include in your programs/
projects. Compared to languages like C++ or C, Python libraries do not pertain to any
specific context in Python. Here, a ‘library’ loosely describes a collection of core modules.
Essentially, then, a library is a collection of modules. A package is a library that can be
installed using a package manager like ruby gems or npm.

Procedure to Install Python Libraries


1. Open your Terminal and Type cd command or Open your window PowerShell then
click
2. Type ‘pip install Libraries name’
Modules
1. pyttsx3
pyttsx3 is a text-to-speech conversion library in Python. Unlike alternative libraries, it works
offline and is compatible with both Python 2 and 3. An application invokes the pyttsx3.init()
factory function to get a reference to a pyttsx3. Engine instance. it is a very easy to use tool
which converts the entered text into speech.
The pyttsx3 module supports two voices first is female and the second is male which is
provided by “sapi5” for windows.
It supports three TTS engines :

 sapi5 – SAPI5 on Windows


 nsss – NSSpeechSynthesizer on Mac OS X
 espeak – eSpeak on every other platform

Installataion

To install the pyttsx3 module, first of all, you have to open the terminal and write

 pip install pyttsx3

Usages

import pyttsx3
engine = pyttsx3.init()
engine.say("I will speak this text")
engine.runAndWait()

2. Speech Recognition
Speech recognition is the process of converting spoken words to text. Python supports many
speech recognition engines and APIs, including Google Speech Engine, Google Cloud
Speech API, Microsoft Bing Voice Recognition and IBM Speech to Text.

Installation

A library that helps is named “Speech Recognition”. You should install it with pyenv, pipenv
or virtualenv. You can also install it system wide:

 pip install SpeechRecognition

The SpeechRecognition module depends on pyaudio, you can install them from your package
manager.

Speech Recognition with Google

 `r.recognize_google(audio, key="GOOGLE_SPEECH_RECOGNITION_API_KEY")`
3. DateTime

In Python, date, time and datetime classes provides a number of function to deal with dates,
times and time intervals. Date and datetime are an object in Python, so when you manipulate
them, you are actually manipulating objects and not string or timestamps. Whenever you
manipulate dates or time, you need to import datetime function.

The datetime classes in Python are categorized into main 5 classes.

 date – Manipulate just date ( Month, day, year)


 time – Time independent of the day (Hour, minute, second, microsecond)
 datetime – Combination of time and date (Month, day, year, hour, second,
microsecond)
 timedelta— A duration of time used for manipulating dates
 tzinfo— An abstract class for dealing with time zones
Project of Voice Assistant Program Using Python
1. Creating New project on Click File->New Project

2. Creating New File on Click Right-side New->Choose Python File


3. It Creates Python Class that’s you choose a location i.e. Directory name -
>location of file->file name

4. Firstly install library module i.e. python programing as to minimize error in


coding process. Required modules install successfully then after Class function
,modules, method coding process proceed.
5. Program will be executed, firstly it wish something like that “Good morning sir !
I am doll sir. Please tell me how can I help you”. You give some instruction like
as “Open Google” or “Open YouTube” or “Play video”.

Potrebbero piacerti anche