doc2
doc2
On
“Electronics Component Identification From Voice”
Submitted to
BACHELOR OF TECHNOLOGY
In
“Computer Science & Engineering”
By
MS Vasavi [21E31A0553]
E Rajeshwari [21E31A0527]
K Chintu [21E31A0542]
2024-2025
i
MAHAVEER INSTITUTE OF SCIENCE & TECHNOLOGY
CERTIFICATE
This is to certify that the industrial oriented mini project work report entitled
“ELECTRONICS COMPONENTS IDENTIFICATION FROM VOICE” which
is being submitted By MS Vasavi [21E31A0553] , E Rajeshwari [21E31A0527],K
Chintu [21E31A0542] in partial fulfilment for the award of the Degree of
BACHELOR OF TECHNOLOGY in COMPUTER SCIENCE &
ENGINEERING of JAWAHARLAL NEHRU TECHNOLOGICAL
UNIVERSIT, is a record of the Bonafide work carried out by them under our
guidance and supervision.
ii
DECLARATION
iii
ACKNOWLEDGEMENT
We would like to express our deepfelt appreciation gratitude to
DR. R. Nakkeeran Professor & HOD, Department of C.S.E, our project guide, for
his skilful guidance, constant supervision, timely suggestion, keen interest and
encouragement in completing the individual seminar within the stipulated time.
We express our thanks to Dr. V. Usha Shree , Principal of our college and the
management of Mahaveer Institute of Science & Technology for providing
excellent academic environment in the college .
We wish to express our gratitude to the Members of staff and all others who
helped us in more than one way. We would also like to thank the Lab assistants and
Programmers for helping us through our project.
MS Vasavi [21E31A0553]
E Rajeshwari [21E31A0527]
K Chintu [21E31A0542]
ABSTRACT
iv
This project describes the architecture of a door phone embedded system with
interactive voice response. Because speech technology is not 100% reliable, the
emphasis was on parts that have greater impact on overall performance (audio
capture, speech recognition and verification, and power consumption). Using an
embedded microphone array increases speech recognition effectiveness in very noisy
environments. To increase the speech recognition performance, a null grammar with
confidence measure support was used. The speaker verification module was also
optimized for nosy environments (using the cepstral mean normalization technique
and a universal background mode.
v
TABLE OF CONTENT
5. Overview Of Concepts 9
5.1 What Is Python 9
vi
5.4 Disadvantages Of Python 12
6. System Design 25
6.1 Architecture 25
6.1 UML Diagrams 25
6.1.1 Use Case Diagrams 27
6.1.2 Class Case Diagrams 28
6.1.3 Sequential Diagrams 29
6.1.4 Collaboration Diagrams 30
7. Implementation 31
vii
8.2.5 Functional Test 43
9. Output Screen 45
10. Conclusion 48
References 49
LIST OF FIGURES
viii
Figure Number Page No
6.1 System Architecture 25
ix
1. INTRODUCTION
1.1 Aim
To achieve electronic component identification from voice input we would
need to build a system capable of processing audio commands and recognizing spoken
descriptions of various components. This would be especially helpful for helping
technicians or engineers identify and retrieve information about components hands-free.
1.2 Objective
1
2. LITERATURE SURVEY
Housing Security System using Red Laser Pointer, Red Laser Pointer, Light
Dependent Resistor, and Digital Came
AUTHOR:
Nurkholis et a
ABSTRACT:
This project deals with a model of laser security alarm system design. Laser
security systems used to be difficult to install and rarely available to anyone other than
the super-rich. Now, there are dozens of different security systems on the market that
utilize lasers and can effectively protect everything from small apartments and businesses
to large areas of property. Most home laser security systems consist of two parts: a basic
alarm unit and an infrared motion detector. Laser based security system is a type of
security and alarm system that uses laser light and a light sensor. Why a laser to be used?
It is known that a laser light goes through long distance without any scattering effect
(disturbing) and it is only visible at source and the destination point so it can be used as
mediator between source and destination but to analyze the source a sensor is need, here
the use of LDR is applicable. Just analysis is not enough alerting should be done in
general alerting is sound effect so here buzzer act as alerting. Making use of this, a laser
security system is designed. Its working: There is a laser diode that generates the laser
beam which continuously strikes over the Light dependent resister sensors. When any
person crosses the path, it inhibits laser to reach LDR and the sensor generate a low
which is read by controller to power on the buzzer.
2
3. SYSTEM ANALYSIS
1. Less accuracy
2. Low efficiency
Convert spoken words into text for further processing. Google Speech-to-Text
API, OpenAI Whisper, or Microsoft Azure Speech Services for real-time, high-accuracy
transcription.
Parse the transcribed text to extract relevant keywords and component details.
NLP Parsing Framework Use spaCy or Hugging Face Transformers to identify
Component type (e.g., resistor, capacitor, IC).
3
Speech/non-speech segmentation is also used to limit likelihood calculation to speech
frames with speaker-important information. This enhances the speaker verification
accuracy and calculation performance
1. High accuracy
2. High efficiency
System : i5 or above.
Ram : 4 GB.
Hard Disk : 40 GB
4
4. ALGORITHMS
5
Spectrogram Analysis:
Log-Mel Features:
o Extracts specific entities from text, such as component names, values, and
package types.
Intent Recognition:
o Identifies the user’s intent, e.g., searching for a component, asking for
specifications, or finding equivalents.
Dependency Parsing:
6
o Techniques like Word2Vec, GloVe, or BERT provide semantic
understanding of component-related terms.
Fuzzy Matching:
Similarity Metrics:
Search Indexing:
Supervised Learning:
Unsupervised Learning:
7
o Clustering algorithms (e.g., K-Means, DBSCAN) to group similar
components or values.
Recommender Systems:
Concatenative TTS:
Parametric TTS:
Neural TTS:
Decision Trees:
Task Scheduling:
8
o Algorithms like Priority Queues or Round Robin to manage multiple
simultaneous voice inputs or database queries.
5. OVERVIEW OF CONCEPTS
Python language is being used by almost all tech-giant companies like – Google,
Amazon, Facebook, Instagram, Dropbox, Uber… etc.
The biggest strength of Python is huge collection of standard libraries which can
be used for the following –
Machine Learning
GUI Applications (like Kivy, Tkinter, PyQt etc. )
Web frameworks like Django (used by YouTube, Instagram, Dropbox)
Image processing (like OpenCV, Pillow)
Web scraping (like Scrapy, Beautiful Soup, Selenium)
Test frameworks
Multimedia
9
5.2 Advantages of Python
Let’s see how Python dominates over other languages.
1. Extensive Libraries
Python downloads with an extensive library and it contain code for various purposes
like regular expressions, documentation-generation, unit-testing, web browsers,
threading, databases, CGI, email, image manipulation, and more. So, we don’t have
to write the complete code for that manually.
2. Extensible
As we have seen earlier, Python can be extended to other languages. You can write
some of your code in languages like C++ or C. This comes in handy, especially in
projects.
3. Embeddable
Complimentary to extensibility, Python is embeddable as well. You can put your
Python code in your source code of a different language, like C++. This lets us
add scripting capabilities to our code in the other language.
4. Improved Productivity
The language’s simplicity and extensive libraries render programmers more
productive than languages like Java and C++ do. Also, the fact that you need to
write less and get more things done.
5. IOT Opportunities
Since Python forms the basis of new platforms like Raspberry Pi, it finds the future
bright for the Internet Of Things. This is a way to connect the language with the real
world.
When working with Java, you may have to create a class to print ‘Hello World’.
But in Python, just a print statement will do. It is also quite easy to
10
learn, understand, and code. This is why when people pick up Python, they have a
hard time adjusting to other more verbose languages like Java.
7. Readable
Because it is not such a verbose language, reading Python is much like reading
English. This is the reason why it is so easy to learn, understand, and code. It also
does not need curly braces to define blocks, and indentation is mandatory. This
further aids the readability of the code.
8. Object-Oriented
This language supports both the procedural and object-oriented programming
paradigms. While functions help us with code reusability, classes and objects let us
model the real world. A class allows the encapsulation of data and functions into
one.
10. Portable
When you code your project in a language like C++, you may need to make some
changes to it if you want to run it on another platform. But it isn’t the same with
Python. Here, you need to code only once, and you can run it anywhere. This is
called Write Once Run Anywhere (WORA). However, you need to be careful
enough not to include any system-dependent features.
11. Interpreted
Lastly, we will say that it is an interpreted language. Since statements are executed
one by one, debugging is easier than in compiled languages.
11
5.3 Advantages of Python Over Other Languages
1. Less Coding
Almost all of the tasks done in Python requires less coding when the same task is
done in other languages. Python also has an awesome standard library support, so
you don’t have to search for any third-party libraries to get your job done. This is the
reason that many people suggest learning Python to beginners.
2. Affordable
Python is free therefore individuals, small companies or big organizations can
leverage the free available resources to build applications. Python is popular and
widely used so it gives you better community support.
So far, we’ve seen why Python is a great choice for your project. But if you choose it,
you should be aware of its consequences as well. Let’s now see the downsides of
choosing Python over another language.
1. Speed Limitations
We have seen that Python code is executed line by line. But since Python is
interpreted, it often results in slow execution. This, however, isn’t a problem unless
speed is a focal point for the project. In other words, unless high speed is a
12
requirement, the benefits offered by Python are enough to distract us from its speed
limitations.
3. Design Restrictions
As you know, Python is dynamically-typed. This means that you don’t need to
declare the type of variable while writing the code. It uses duck-typing. But wait,
what’s that? Well, it just means that if it looks like a duck, it must be a duck. While
this is easy on the programmers during coding, it can raise run-time errors.
5. Simple
No, we’re not kidding. Python’s simplicity can indeed be a problem. Take my
example. I don’t do Java, I’m more of a Python person. To me, its syntax is so simple
that the verbosity of Java code seems unnecessary.
This was all about the Advantages and Disadvantages of Python Programming
Language.
13
5.5 History of Python
If we are talking about ABC in the Python context, it's clear that the programming
language ABC is meant. ABC is a general-purpose programming language and
programming environment, which had been developed in the Netherlands, Amsterdam,
at the CWI (Centrum Wiskunde &Informatica). The greatest achievement of ABC was
to influence the design of Python. Python was conceptualized in the late 1980s. Guido
van Rossum worked that time in a project at the CWI, called Amoeba, a distributed
operating system. In an interview with Bill Venners 1, Guido van Rossum said: "In the
early 1980s, I worked as an implementer on a team building a language called ABC at
Centrum Wiskunde & Informatica (CWI). I don't know how well people know ABC's
influence on Python. I try to mention ABC's influence because I'm indebted to
everything I learned during that project and to the people who worked on it. "Later on
in the same Interview, Guido van Rossum continued: "I remembered all my experience
and some of my frustration with ABC. I decided to try to design a simple scripting
language that possessed some of ABC's better properties, but without its problems. So I
started typing. I created a simple virtual machine, a simple parser, and a simple
runtime. I made my own version of the various ABC parts that I liked. I created a basic
syntax, used indentation for statement grouping instead of curly braces or begin-end
blocks, and developed a small number of powerful data types: a hash table (or
dictionary, as we call it), a list, strings, and numbers."
Before we take a look at the details of various machine learning methods, let's start by
looking at what machine learning is, and what it isn't. Machine learning is often
categorized as a subfield of artificial intelligence, but I find that categorization can often
be misleading at first brush. The study of machine learning certainly arose from research
in this context, but in the data science application of machine learning methods, it's more
helpful to think of machine learning as a means of building models of data.
14
Fundamentally, machine learning involves building mathematical models to help
understand data. "Learning" enters the fray when we give these models tunable
parameters that can be adapted to observed data; in this way the program can be
considered to be "learning" from the data. Once these models have been fit to previously
seen data, they can be used to predict and understand aspects of newly observed data. I'll
leave to the reader the more philosophical digression regarding the extent to which this
type of mathematical, model-based "learning" is similar to the "learning" exhibited by the
human brain. Understanding the problem setting in machine learning is essential to using
these tools effectively, and so we will start with some broad categorizations of the types
of approaches we'll discuss here.
At the most fundamental level, machine learning can be categorized into two main
types: supervised learning and unsupervised learning.
We will see examples of both types of supervised learning in the following section.
15
Need for Machine Learning
Human beings, at this moment, are the most intelligent and advanced species on
earth because they can think, evaluate and solve complex problems. On the other side, AI
is still in its initial stage and haven’t surpassed human intelligence in many aspects. Then
the question is that what is the need to make machine learn? The most suitable reason for
doing this is, “to make decisions, based on data, with efficiency and scale”.
Emotion analysis
Sentiment analysis
Error detection and prevention
Weather forecasting and prediction
Stock market analysis and forecasting
Speech synthesis
Speech recognition
Customer segmentation
16
Object recognition
Fraud detection
Fraud prevention
Recommendation of products to customer in online shopping
Arthur Samuel coined the term “Machine Learning” in 1959 and defined it as
a “Field of study that gives computers the capability to learn without being
explicitly programmed”.
And that was the beginning of Machine Learning! In modern times, Machin Learning
is one of the most popular (if not the most!) career choices. According to Indeed,
Machine Learning Engineer Is The Best Job of 2019 with a 344% growth and an
average base salary of $146,085 per year.
But there is still a lot of doubt about what exactly is Machine Learning and how to
start learning it? So this article deals with the Basics of Machine Learning and also the
path you can follow to eventually become a full-fledged Machine Learning Engineer.
Now let’s get started!!!
This is a rough roadmap you can follow on your way to becoming an insanely
talented Machine Learning Engineer. Of course, you can always modify the steps
according to your needs to reach your desired end-goal.
In case you are a genius, you could start ML directly but normally, there are some
prerequisites that you need to know which include Linear Algebra, Multivariate
Calculus, Statistics, and Python. And if you don’t know these, never fear! You don’t
need a Ph.D. degree in these topics to get started but you do need a basic
understanding.
17
(a) Learn Linear Algebra and Multivariate Calculus
Data plays a huge role in Machine Learning. In fact, around 80% of your time as an
ML expert will be spent collecting and cleaning data. And statistics is a field that
handles the collection, analysis, and presentation of data. So it is no surprise that you
need to it
Some of the key concepts in statistics that are important are Statistical Significance,
Probability Distributions, Hypothesis Testing, Regression, etc. Also, Bayesian
Thinking is also a very important part of ML which deals with various concepts like
Conditional Probability, Priors, and Posteriors, Maximum Likelihood, etc.
Some people prefer to skip Linear Algebra, Multivariate Calculus and Statistics
and learn them as they go along with trial and error. But the one thing that you
absolutely
cannot skip is Python! While there are other languages you can use for Machine
Learning like R, Scala, etc. Python is currently the most popular language for ML. In
fact, there are many Python libraries that are specifically useful for Artificial
Intelligence and Machine Learning such as Keras, TensorFlow, Scikit-learn, etc.
18
Step 2 – Learn Various ML Concepts
Now that you are done with the prerequisites, you can move on to actually
learning ML (Which is the fun part!!!) It’s best to start with the basics and then move
on to the more complicated stuff. Some of the basic concepts in ML are:
Machine Learning can review large volumes of data and discover specific trends
and patterns that would not be apparent to humans. For instance, for an e-commerce
website like Amazon, it serves to understand the browsing behaviors and purchase
histories of its users to help cater to the right products, deals, and reminders relevant to
them. It uses the results to reveal relevant advertisements to them.
19
2. No human intervention needed (automation)
With ML, you don’t need to babysit your project every step of the way. Since it
means giving machines the ability to learn, it lets them make predictions and also
improve the algorithms on their own. A common example of this is anti-virus softwares;
they learn to filter new threats as they are recognized. ML is also good at recognizing
spam.
3. Continuous Improvement
Machine Learning algorithms are good at handling data that are multi-
dimensional and multi-variety, and they can do this in dynamic or uncertain
environments.
5. Wide Applications
You could be an e-tailer or a healthcare provider and make ML work for you.
Where it does apply, it holds the capability to help deliver a much more personal
experience to customers while also targeting the right customers.
1. Data Acquisition
Machine Learning requires massive data sets to train on, and these should be
inclusive/unbiased, and of good quality. There can also be times where they must wait
for new data to be generated.
20
2. Time and Resources
ML needs enough time to let the algorithms learn and develop enough to fulfill
their purpose with a considerable amount of accuracy and relevancy. It also needs
massive resources to function. This can mean additional requirements of computer
power for you.
3. Interpretation of Results
4. High error-susceptibility
The rules for ordering comparisons have been simplified. E.g. a heterogeneous list
cannot be sorted, because all the elements of a list must be comparable to each other.
21
There is only one integer type left, i.e. int. long is int as well.
The division of two integers returns a float instead of an integer. "//" can be used to
have the "old" behavior.
Purpose
Python
Modules Used
TensorFlow
TensorFlow is a free and open-source software library for dataflow and differentiable
programming across a range of tasks. It is a symbolic math library, and is also used
for machine learning applications such as neural networks. It is used for both
research and production at Google.
TensorFlow was developed by the Google Brain team for internal Google use. It was
released under the Apache 2.0 open-source license on November 9, 2015.
NumPy
22
It is the fundamental package for scientific computing with Python. It contains
various features including these important ones:
Pandas
Matplotlib
23
For simple plotting the pyplot module provides a MATLAB-like interface,
particularly when combined with IPython. For the power user, you have full control
of line styles, font properties, axes properties, etc, via an object oriented interface or
via a set of functions familiar to MATLAB users.
Scikit – learn
programming. Created by Guido van Rossum and first released in 1991, Python has a
design philosophy that emphasizes code readability, notably using significant
whitespace.
24
6. SYSTEM DESIGN
6.1 Architecture
GOALS
26
6.2.1 USE CASE DIAGRAM
27
6.2.2 CLASS DIAGRAM
28
6.2.3 SEQUENCE DIAGRAM
29
6.2.4 COLLABRATION DIAGRAM
30
7. IMPLEMENTATION
Before you start with the installation process of Python. First, you need to know about
your System Requirements. Based on your system type i.e. operating system and
based processor, you must download the python version. My system type is a Windows
64-bit operating system. So the steps below are to install python version 3.7.4 on
Windows 7 device or to install Python 3. Download the Python Cheat sheet here . The
steps on how to install Python on Windows 10, 8 and 7 are divided into 4 parts to help
understand better.
Step 1: Go to the official site to download and install python using Google Chrome or
any other web browser. OR Click on the following link: https://www.python.org
31
Now, check for the latest and the correct version for your operating system.
Step 3: You can either select the Download Python for windows 3.7.4 button in Yellow
Color or you can scroll further down and click on download with respective to their
32
version. Here, we are downloading the most recent python version for windows 3.7.4
Step 4: Scroll down the page until you find the Files option.
Step 5: Here you see a different version of python along with the operating system.
33
• To download Windows 32-bit python, you can select any one from the three options:
Windows x86 embeddable zip file, Windows x86 executable installer or Windows x86
web-based installer.
•To download Windows 64-bit python, you can select any one from the three options:
Windows x86-64 embeddable zip file, Windows x86-64 executable installer or
Windows x86-64 web-based installer.
7.2 Installation of Python
Step 1: Go to Download and Open the downloaded python version to carry out the
installation process.
Step 2: Before you click on Install Now, Make sure to put a tick on Add Python 3.7 to
PATH.
Step 3: Click on Install NOW After the installation is successful. Click on Close.
With these above three steps on python installation, you have successfully and correctly
34
Verify the Python Installation
Step 1: Click on Start
Step 2: In the Windows Run Command, type “cmd”.
35
Step 3: Click on IDLE (Python 3.7 64-bit) and launch the program
Step 4: To go ahead with working in IDLE you must first save the file. Click on File >
Click on Save
Step 5: Name the file and save as type should be Python files. Click on SAVE. Here I
have named the files as Hey World.
36
7.3 Code Snippets
import tkinter
import numpy as np
import sounddevice as sd
import subprocess
import speech_recognition as sr
import os
import cv2
r = sr.Recognizer()
main = tkinter.Tk()
37
main.title("Electronics Component Identification")
main.geometry("1300x1200")
window = np.ones((length, ))
begin_index = conv.argmax()
return audio[begin_index:begin_index+length]
def startRecording():
global recorded_feature
text.delete('1.0', END)
samplerate = 16000
text.update_idletasks()
sd.play(recording, blocking=True)
if os.path.exists('record.wav'):
38
os.remove('record.wav')
if os.path.exists('record1.wav'):
os.remove('record1.wav')
res = subprocess.check_output(os.getcwd()+'/model/ffmpeg.exe -i
'+os.getcwd()+'/record.wav -acodec pcm_s16le -ac 1 -ar 16000
'+os.getcwd()+'/record1.wav', shell=False)
print(recording.shape)
text.insert(END,"Recording completed")
text.update_idletasks()
def recognize():
global
text.delete('1.0', END)
audio = r.record(source)
try:
output = r.recognize_google(audio)
except sr.UnknownValueError:
except sr.RequestError as e:
39
output = output.lower().strip()
text.update_idletasks()
if os.path.exists("images/"+output+".jpg"):
img = cv2.imread("images/"+output+".jpg")
img = cv2.resize(img,(600,400))
cv2.waitKey(0)
else:
text.update_idletasks()
title.config(font=font)
title.config(height=3, width=120)
title.place(x=0,y=5)
40
font1 = ('times', 14, 'bold')
startButton.place(x=50,y=150)
startButton.config(font=font1)
recognizeButton.place(x=250,y=150)
recognizeButton.config(font=font1)
text=Text(main,height=20,width=150)
scroll=Scrollbar(text)
text.configure(yscrollcommand=scroll.set)
text.place(x=10,y=250)
41
text.config(font=font1)
main.config(bg='snow3')
main.mainloop
8. TESTING
The purpose of testing is to discover errors. Testing is the process of trying to discover
every conceivable fault or weakness in a work product. It provides a way to check the
functionality of components, sub assemblies, assemblies and/or a finished product It is
the process of exercising software with the intent of ensuring that the Software system
meets its requirements and user expectations and does not fail in an unacceptable manner.
Black Box Testing is testing the software without any knowledge of the
inner workings, structure or language of the module being tested. Black box tests, as most
other kinds of tests, must be written from a definitive source document, such as
specification or requirements document, such as specification or requirements document.
It is a testing in which the software under test is treated.
42
Unit testing involves the design of test cases that validate that the internal
program logic is functioning properly, and that program inputs produce valid outputs. All
decision branches and internal code flow should be validated. It is the testing of
individual software units of the application .it is done after the completion of an
individual unit before integration. This is a structural testing, that relies on knowledge of
its construction and is
43
example of system testing is the configuration oriented system integration test. System
testing is based on process descriptions and flows
Features to be tested
Verify that the entries are of the correct format
No duplicate entries should be allowed
All links should take the user to the correct page.
44
9. OUTPUT SCREENS
Figure 9.1
In above screen click on ‘Start Recording’ button and then speak any name
of electronic component such as ‘ic, resistor, register, diode, switch, relay
45
motor, led, fuse, capacitor and battery. After recording voice then you will
get message as ‘Recording Completed’ and after getting message click on
‘Recognize Speech’ button to identify component.
Figure 9.2
In above screen recording is started and after 3 second will get message as
‘Recording Completed’ and then you will click on ‘Recognize Speech’
button to get below output
46
Figure 9.3
Figure 9.4
In above screen if word not found in database then it will display error message
47
Note: while execution if application hang then re-execute code
10. CONCLUSION
Identifying electronic components through voice recognition is an innovative
solution that simplifies the search and retrieval process, making it especially useful for
engineers, hobbyists, and technicians. By integrating cutting-edge technologies like
speech-to-text, natural language processing (NLP), and robust component databases, such
a system can transform how electronic components are identified and accessed. It
represents a promising step toward modernizing how electronic components are searched
and utilized in the industry
48
10. REFERENCES
[1] Nurkholis et al. “Housing Security System using Red Laser Pointer, Red Laser
Pointer, Light Dependent Resistor, and Digital Camera .2015., Sunan Kalijaga Islamic
State University
[2] Rabiner. L.R.; Juang. B.H.,2006; Speech Recognition: Statistical Methods, America,
Elsevier Ltd.
[3] Juang. B.H.; Rabiner. L.R.,1991; Hidden Markov Models for Speech Recognition,
Amerika, Technimetrics.
[4] Natural Language Processing with Python by Steven Bird, Ewan Klein, and Edward
Loper.
[5] Speech and Language Processing by Daniel Jurafsky and James H. Martin.
[6] Deep Learning for Natural Language Processing by Palash Goyal, Sumit Pandey, and
Karan Jain.
49
50