Technical discussion about Matlab and issues related to Digital Signal Processing.
Post a new Thread
Voice Recognition - barisda - Oct 24 11:14:00 2005
Hi all, I have written a matlab code that compares two recorded
voices and gives a number indicating how similar the two files are.
But I am having couple of problems with that code;
First of all, dimensions of the recorded .wav file is (length)*2
matrix while it should be in the form of length*1 matrix.
Second, the pitch values I get are very small like 0.0365 even when I
use the same file to compare with itself.
Could you check the code and tell me what I am doing wrong? By the
way I am using cross correlation to get linear correlation to compare
the two signals.The code is as follows:
y1=wavread('off1'); //giving me length by 2 matrix
y2=wavread('off2'); //giving me length by 2 matrix
N=length(y1);
M=length(y2);
Y1=fft(y1,N+M);
Y2=fft(y2,N+M);
c12=(Y1.*conj(Y2))/(N+M); //this part is for linear corellation
C12=abs(c12);
max(C12) //this should be the pitch
figure, plot(C12); //plot(C12, N+M)does not work
[A,phi,S,f] = f_spec (y1, N+M, 1);
thanks,

(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )
Re: Voice Recognition - Mandar Rahurkar - Oct 26 3:06:00 2005
length by 2 matrix => your wavfile is probably stereo.
Mandar
--- barisda <barisda@bari...> wrote:
> Hi all, I have written a matlab code that compares two recorded
> voices and gives a number indicating how similar the two files are.
>
> But I am having couple of problems with that code;
>
> First of all, dimensions of the recorded .wav file is (length)*2
> matrix while it should be in the form of length*1 matrix.
>
> Second, the pitch values I get are very small like 0.0365 even when
> I
> use the same file to compare with itself.
>
> Could you check the code and tell me what I am doing wrong? By the
> way I am using cross correlation to get linear correlation to
> compare
> the two signals.The code is as follows:
>
> y1=wavread('off1'); //giving me length by 2 matrix
> y2=wavread('off2'); //giving me length by 2 matrix
> N=length(y1);
> M=length(y2);
>
> Y1=fft(y1,N+M);
> Y2=fft(y2,N+M);
>
> c12=(Y1.*conj(Y2))/(N+M); //this part is for linear corellation
> C12=abs(c12);
> max(C12) //this should be the pitch
> figure, plot(C12); //plot(C12, N+M)does not work
> [A,phi,S,f] = f_spec (y1, N+M, 1);
>
> thanks,
-------------------------------------
Its not life that weighs us down,
Its how we carry it.
------------------------------------

(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )
Axes - Justice - Nov 11 21:15:00 2005
Hello,
I want to display an image on axes (Axes1) and use ginput command to get the coordinates from
the image from only the image,.... but when I run ginput it is active on my entire window! How
can I have the ginput to be only active on the Image?
Your help is highly appreciated!
Regards - Justice
' Don't ever take a fence down until you know the reason it was put up. ' - GK Chesterton

(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )