Sie sind auf Seite 1von 4

LAB 2 DIGITAL SIGNAL PROCESSING VOICE RECOGNITION IN

MATLAB
Estimated time to complete this la! "# mi$%tes
Voice recognition process the word spoken is taken as input to program. In this
process it is important to that virtual reality because it provides a very natural &
intuitive way by controlling the simulation while is allows the user to remain
free. In this article we will dive into the uses of voice recognition by using virtual
reality and then we will examine how recognition of voice is performed.
Characteristics of an individuals voice were thought to be able to characterize the
uniueness of an individual much like a fingerprint. !he early systems had many
flaws and research ensued to derive a more reliable method of predicting the
correlation between two sets of speech utterances. "peaker identification research
continues today under the realm of the field of digital signal processing where
many advances have taken place in recent years.
!he efficiency of speech recognition system is dependent on word error rate in
speech recognition which is in # and is measured for some kind of specific
technologies for example if a task is given and you can say in a specified mode
and specified word vocabulary is also considered. "ometimes robust speech
recognition systems may be applied to gain the high accuracy.
!he ob$ective of this lab is to recognize voice uniuely and compare it against a
database to check weather person is authorized on not. %ut a problem is that a
human can easily recognize a voice and a program cannot recognize this easily so
this task is very difficult for the computer to recognize the different features of
voice. &any Complex problem arise while writing algorithm for different kind of
voice recognition system. !his problem may arise because to say a same word at
different times becomes difficult. "ome of the factors that are vary or change time
to time in the human speech that how fast word is being spoken. 'ini masih
banyak spasi yang ke klik ( kali)
Lab Objectives
*fter completing this lab+ students will be able to,
-ecognize voice uniuely and compare it against a database
Lab Procedures
A. Recognizing Voice Uniquely and Comparing t Against a
!atabase
In this exercise+ the first step is to define time frame for recording
command words having duration"#$$$$ mille seconds+ %requency
%s"&$$$ '(. !he next step is to record key word sample using
.wavrecord/ command+ take value above 0.1 magnitude voice sample+
calculate the difference and store the file using .wavwrite/ command. !o
store other samples for key words procedure is same as previous. In the
2igital "ignal 3rocessing Voice -ecognition in &*!4*% (51
second step read the file and take above 0.1 magnitude value for the
current voice sample. Calculate the difference and store in a variable
which is then compared with pre define time frame if it match then give
the output.
6ollow these steps to recognize voice uniuely and compare it against a
database,
1. 7pen )A*LA+ R,$-#a.
(. file_reverse=wavrecord (duration1,fs);
!his command is used to record command word with
parameters, time frame .duration1=40000/ and freuency
.fs=8000/.
3. [x_reverse y_reverse=find(file_reverse!.1);
!his command is used to take above 0.1 magnitude speech sample and
discard below.
8. diff_reverse="ax(x_reverse)#"in(x_reverse);
!his command finds the difference between maximum and minimum
value of speech sample and store in a variable.
9. wavwrite(file_reverse,$c%&voice&reverse.wav$);
!his command is used to store voice sample in memory location of the
computer. !hen plot the graph between time and magnitude axis. In
the final step we compare the recorded sample with the real time
speech.
:. In the workspace+ please enter the following script ,
'(et ready to record your na"e$
for i = 1%1
file = s)rintf(*+s+d.wav*,*rec*,i);
in)ut(*,ress enter w-en ready to record your na"e*);
y = wavrecord(88.00,44100);
soundsc(y,44100);
wavwrite(y,44100,file);
end
na"e = in)ut (*/nter t-e na"e t-at "ust 0e reco1ni2ed% *,
*s*);
for 3 = 1%1
file = s)rintf (*+s+d.wav*, *rec*,3);
)at-=*rec1.wav*;
file=cat(.,)at-,file);
[t, fs = wavread (file);
+ 4ro) recordin1 to a window t-at 3ust contains t-e
s)eec-
s = a0s (t);
2igital "ignal 3rocessing Voice -ecognition in &*!4*% (5(
end
'now t-e co")arison al1o$
in)ut (*,ress enter w-en ready*)
userte") = wavrecord (88.00,44100);
sound ( userte"),44100 );
rec = in)ut (* ,ress 0utton 1 to record a1ain or )ress
enter to )roceed% *);
w-ile rec == 1
rec = 0;
in)ut (*,ress enter w-en you ready*)
userte") = wavrecord (88.00,44100);
soundsc (userte"),44100);
rec = in)ut (*,ress 1 a1ain to record a1ain % *);
end
+ 4ro) recordin1 to a window t-at 3ust contains t-e
s)eec-
s1 = a0s (userte"));
+s1=userte");
if s==s1
f)rintf(*5ou are +s*,na"e);
else
f)rintf(*5ou are not +s*,na"e);
end
;. *fter you are run the script+ you will enter the voice input and type the
keyboard input. If the voice recognize and same with the keyboard
input the output will appear as follow ,
2igital "ignal 3rocessing Voice -ecognition in &*!4*% (5<
2igital "ignal 3rocessing Voice -ecognition in &*!4*% (58

Das könnte Ihnen auch gefallen