Voice Recognition Using Matlab PDF

Title Voice Recognition Using Matlab
Course Signals And Systems
Institution Delhi Technological University
Pages 20
File Size 541.1 KB
File Type PDF
Total Downloads 82
Total Views 145

Summary

Download Voice Recognition Using Matlab PDF


Description

VOICE RECOGNITION IN MATLAB USING CORRELATION

A PROJECT REPORT SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE AWARD OF THE DEGREE OF

BACHELOR OF TECHNOLOGY IN

SIGNALS AND SYSTEMS

Submitted by:

TURSÉLIO PIRES MAHOQUE 2K19/EC/196 Under the supervision of

DR. PRIYANKA JAIN

DEPARTEMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING DELHI TECHNOLOGICAL UNIVERSITY (Formerly Delhi College of Engineering) Bawana Road, Delhi-110042

NOVEMBER, 2020

i DELHI TECHNOLOGICAL UNIVERSITY (Formerly Delhi College of Engineering) Bawana Road, Delhi-110042

CANDIDATE'S DECLARATION I, TURSÉLIO PIRES MAHOQUE, 2K19/EC/196, Second year student of B. Tech. Signals and Systems, hereby declare that the project Dissertation

titled

“VOICE

RECOGNITION

IN

MATLAB

USING

CORRELATION" which is submitted by me to the Department of Electronics and Communication Engineering, Delhi Technological University, Delhi in partial fulfilment of the requirement for the award of the degree of Bachelor of Technology, is original and not copied from any source without proper citation.

Place: Delhi MAHOQUE Date: November 23rd, 2020

TURSÉLIO

PIRES

ii DELHI TECHNOLOGICAL UNIVERSITY (Formerly Delhi College of Engineering) Bawana Road, Delhi-110042

CERTIFICATE I

hereby certify

that

the

Project

Dissertation titled "

VOICE

RECOGNITION IN MATLAB USING CORRELATION " which is submitted by

TURSÉLIO

PIRES

MAHOQUE,

2K19/EC/196,

Department

of

Electronics and Communication Engineering, Delhi Technological University, Delhi in partial fulfilment of the requirement for the award of the degree of Bachelor of Technology, is a record of the project work carried out by the student under my supervision.

Place: Delhi Date: November 23rd, 2020

DR. PRIYANKA JAIN SUPERVISOR

iii

ACKNOWLEDGEMENT

I would like to express my deepest gratitude to the Almighty God, for keeping giving me His blessings, allowing me to have the opportunity to be a student at DTU. My deepest appreciation to my family, specially my mom, for their endless love, support and encouragement. I would like to extend my sincere thanks to my Signals and Systems lecturer, Dr Priyanka Jain, for always provide her guidance, and lecturing with great enthusiasm and patience, leaving no space to doubts, enabling me to do the project and the report in the best possible way.

iv

ABSTRACT

This paper presents a software built using the Matlab with the purpose of realizing the task of recognizing voice, using the correlation function. The input signal is correlated with each of the sample files present in the database, and if a correspondence is found, it grants access, of not, it denies access.

v

TABLE OF CONTENTS Candidate's declaration...................................................................................................i Certificate.........................................................................................................................ii Acknowledgment............................................................................................................iii Abstract...........................................................................................................................iv CHAPTER 1: INTRODUCTION..................................................................................1 1.1.

General................................................................................................................1

1.2.

Objectives...........................................................................................................1

CHAPTER 2: PROJECT DESCRIPTION...................................................................2 2.1.

Literature review.................................................................................................2

2.1.1.

Voice recognition............................................................................................2

2.1.1.1. 2.1.2.

Types of voice recognition systems.............................................................3 Correlation.......................................................................................................3

2.1.2.1.

Autocorrelation............................................................................................3

2.1.2.2.

Cross-correlation.........................................................................................4

2.2.

Matlab code.........................................................................................................4

2.3.

Matlab code explanation.....................................................................................8

CHAPTER 3: TESTS RESULTS AND CONCLUSION...........................................10 3.1.

Test and results..................................................................................................10

3.2.

Conclusion........................................................................................................12

REFERENCES..............................................................................................................13

vi LIST OF FIGURES Y Figure 1: Examples of autocorrelation of signals.............................................................3 Figure 2: Examples of autocorrelation of signals.............................................................4 Figure 3:(a) Command window of MATLAB before pressing enter (b) Command window of MATLAB after pressing enter.......................................................................10 Figure 4: Plotted graphs of the correlations....................................................................11 Figure 5: :(a) Command window of MATLAB before pressing enter (b) Command window of MATLAB after pressing enter.......................................................................11 Figure 6: Plotted graphs of the correlations...................................................................12

1

CHAPTER 1

INTRODUCTION

1.1.

GENERAL

Communication technology continues to evolve at a rapid pace, and, as voice recognition part of it, it follows the same principle. It can be safely stated that voice recognition is becoming a feature of great importance in the life of the humankind. It is one of the basic components of security systems, automated systems, voice assistant softwares, etc. As the technology advances, there is a need of creating things that do more with less, and the present projects fits in this definition, performing the voice recognition based of one simple function, the correlation function. This project is based on a similar one found on the YouTube channel named “The Engineering Projects”.

1.2.

OBJECTIVES

The project had as its objectives the following aspects: 

To design a voice recognition system in Matlab using correlation;



To explain the theory and working of behind voice recognition.

2

CHAPTER 2

PROJECT DESCRIPTION

2.1.

LITERATURE REVIEW

2.1.1. Voice recognition Alternatively referred to as speech recognition, voice recognition is a computer software program or hardware device with the ability to decode the human voice. (Computer Hope, 2020) In a more technical way, voice or speech recognition can be defined as an interdisciplinary subfield of computer science and computational linguistics that develops methodologies and technologies that enable the recognition and translation of spoken language into text by computers. It is also known as automatic speech recognition (ASR), computer speech recognition or speech to text (STT). It incorporates knowledge

and

research

in

the computer

science, linguistics and computer

engineering fields. The first ASR device was used in 1952 and recognized single digits spoken by a user (it was not computer driven). Today, ASR programs are used in many industries, including healthcare, military (e.g., F-16 fighter jets), telecommunications, personal computing (e.g., hands-free computing), digital assistance (such as Siri from Apple, Bixby from Samsung, Cortana from Lenovo).

3 2.1.1.1.

Types of voice recognition systems

There are, in general, five (5) types of recognition systems, namely: 

Speaker dependent system - The voice recognition requires training before it can be used, which requires you to read a series of words and phrases.



Speaker independent system - The voice recognition software recognizes most users' voices with no training.



Discrete speech recognition - The user must pause between each word so that the speech recognition can identify each separate word.



Continuous speech recognition - The voice recognition can understand a normal rate of speaking.



Natural language - The speech recognition not only can understand the voice, but can also return answers to questions or other queries that are being asked.

2.1.2. Correlation Correlation is a measure of similarity between two signals, i.e., indicates the measure up to which the given signal resembles another signal. Correlation is a mathematical operation that is very similar to convolution. Just as with convolution, correlation uses two signals to produce a third signal. (Smith, 1998) There are two types of convolution: Autocorrelation and cross-correlation.

2.1.2.1.

Autocorrelation

This is a type of correlation in which the given signal is correlated with itself, usually the time-shifted version of itself (Sneha, 2017).

Figure 1: Examples of autocorrelation of signals

4 Mathematical expression for the autocorrelation of continuous-time signal x (t) is given as: ∞

R xx (τ )= ∫ x ( t ) x ¿ ( t−τ )dτ −∞

Where * denotes complex conjugate Similarly, for a discrete-time signal: ∞

R xx [ m ]= ∑ x [ n] x ¿ [ n−m ] n=−∞

2.1.2.2.

Cross-correlation

This is a kind of correlation, in which the signal in-hand is correlated with another signal so as to know how much resemblance exists between them.

Figure 2: Examples of autocorrelation of signals

Mathematical expression for the cross-correlation of continuous time signals x (t) and y (t) is given by: ∞

R xy (τ )= ∫ x ( t ) y ¿ (t−τ ) dτ −∞

Similarly, for a discrete-time signal: ∞

R xx [ m ]= ∑ x [ n] x ¿ [ n−m ] n=−∞

2.2.

MATLAB CODE 1. function speechrecognition(filename) 2. fprintf('TURSÉLIO PIRES MAHOQUE- 2K19/EC/196 \n')

5 3. fprintf('Voice Recognition Using Correlation \n') 4. fprintf('') 5. fprintf('') 6. %Write Following Command on Command Window in order to start the program 7. %speechrecognition('test.wav') 8. voice=audioread(filename); 9. x=voice; 10.

x=x';

11.

x=x(1,:);

12.

x=x';

13.

z=xcorr(x,x);

14.

l=length(z);

15.

t=-((l-1)/2):1:((l-1)/2);

16.

t=t';

17.

y1=audioread('one.wav');

18.

y1=y1';

19.

y1=y1(1,:);

20.

y1=y1';

21.

z1=xcorr(x,y1);

22.

m1=max(z1);

23.

l1=length(z1);

24.

t1=-((l1-1)/2):1:((l1-1)/2);

25.

t1=t1';

26.

subplot(3,2,1);

27.

plot(t1,z1);

28.

title('Sample 1');

29.

grid on;

30.

y2=audioread('two.wav');

31.

y2=y2';

32.

y2=y2(1,:);

6 33.

y2=y2';

34.

z2=xcorr(x,y2);

35.

m2=max(z2);

36.

l2=length(z2);

37.

t2=-((l2-1)/2):1:((l2-1)/2);

38.

t2=t2';

39.

subplot(3,2,2);

40.

plot(t2,z2);

41.

title('Sample 2');

42.

grid on;

43.

y3=audioread('three.wav');

44.

y3=y3';

45.

y3=y3(1,:);

46.

y3=y3';

47.

z3=xcorr(x,y3);

48.

m3=max(z3);

49.

l3=length(z3);

50.

t3=-((l3-1)/2):1:((l3-1)/2);

51.

t3=t3';

52.

subplot(3,2,3);

53.

plot(t3,z3);

54.

title('Sample 3');

55.

grid on;

56.

y4=audioread('four.wav');

57.

y4=y4';

58.

y4=y4(1,:);

59.

y4=y4';

60.

z4=xcorr(x,y4);

61.

m4=max(z4);

62.

l4=length(z4);

63.

t4=-((l4-1)/2):1:((l4-1)/2);

64.

t4=t4';

7 65.

subplot(3,2,4);

66.

plot(t4,z4);

67.

title('Sample 4');

68.

grid on;

69.

y5=audioread('five.wav');

70.

y5=y5';

71.

y5=y5(1,:);

72.

y5=y5';

73.

z5=xcorr(x,y5);

74.

m5=max(z5);

75.

l5=length(z5);

76.

t5=-((l5-1)/2):1:((l5-1)/2);

77.

t5=t5';

78.

subplot(3,2,5);

79.

plot(t5,z5);

80.

title('Sample 5');

81.

grid on;

82.

subplot(3,2,6);

83.

plot(t,z,’r’);

84.

title('Input signal');

85.

grid on;

86.

m6=300;

87.

a=[m1 m2 m3 m4 m5 m6];

88.

m=max(a);

89.

h=audioread('granted.wav');

90.

if m...


Similar Free PDFs