Hi I am wondering if anyone can help me with this problem. I am trying

to get the min dist between two vowels in two utterances and return the

values of the start of the vowel and the end of the vowel. I have

started the following code but need to know how to expand it ??!!

Thanks

Sara

% [b_start,b_stop]=find_sound(file_a,file_b,a_start,a_stop);

%

% Finds the point of best matching between a segment of file_a

% specified by a_start and a_stop (seconds) and a similar segment from

% file_b. Start and stop times of the segment b are returned

%

% The minim distance min_dist is also returned which is a measure of

the

% similarity of the two waveforms

%

%

function

[b_start,b_stop,min_dist]=find_sound(file_a,file_b,a_start,a_stop);

[ya,fsa]=wavread(file_a); % Read the sound a

[yb,fsb]=wavread(file_b); % Read the sound b

***

fs=fsa;

n_lpc=round(fs/1000)+3; % Number of prediction coefficients

% Compute LPC coefficients

a_lpc=lpc(a_f',n_lpc); % Signal should be in columns -> transpose

matrix

b_lpc=lpc(b_f',n_lpc); % Signal should be in columns -> transpose

matrix

nf_a=size(a_f,1); % Number of frames for signal a

nf_b=size(b_f,1); % Number of frames for signal b

final_dist=[]; % LPC distance (frame level)

time_stamps=[]; % Time for each distance

total_dist=[];

I need to extract the times now!!

Can anyone help!!!

Thanks

Hi,

So you are trying to find the min dist between two vowels in two

words?? I think you have th eright idea in the code you have but to

extract the times you need to use

max_f1=nf_b-nf_a+1; % Maximum frame for signal b

for f1=1:max_f1; % Sweep on signal b at frame level

par_dist=0; % Partial distance

for f2=1:nf_a % Compute the LPC distance

a=a_lpc(f2,:);b=b_lpc(f1+f2-1,:);

par_dist=par_dist+sqrt(sum((a-b).^2)); % Euclidian distance

end

total_dist(f1)=par_dist/nf_a; % Update distance (frame level)

time_stamps(f1)=f1*ns_inc; % Update time (frame level)

end

Then to find the mindist use:

[min_dist,i]=min(total_dist); % Determine minimum distance

To get the time returned use:

b_start=time_stamps(i)/fs; % Compute the time for the minimum distance

The end time can be computed by :

b_stop=b_start+(a_stop-a_start); % Compute the end time of the segment

in file b

I hope this helps!!!

Ben

So you are trying to find the min dist between two vowels in two

words?? I think you have th eright idea in the code you have but to

extract the times you need to use

max_f1=nf_b-nf_a+1; % Maximum frame for signal b

for f1=1:max_f1; % Sweep on signal b at frame level

par_dist=0; % Partial distance

for f2=1:nf_a % Compute the LPC distance

a=a_lpc(f2,:);b=b_lpc(f1+f2-1,:);

par_dist=par_dist+sqrt(sum((a-b).^2)); % Euclidian distance

end

total_dist(f1)=par_dist/nf_a; % Update distance (frame level)

time_stamps(f1)=f1*ns_inc; % Update time (frame level)

end

Then to find the mindist use:

[min_dist,i]=min(total_dist); % Determine minimum distance

To get the time returned use:

b_start=time_stamps(i)/fs; % Compute the time for the minimum distance

The end time can be computed by :

b_stop=b_start+(a_stop-a_start); % Compute the end time of the segment

in file b

I hope this helps!!!

Ben

Hi again,

Thank you for your quick reply!I will try that now and see if it works!

Thanks

Sara

Thank you for your quick reply!I will try that now and see if it works!

Thanks

Sara

1. Customise Calendar Time Scale e.g. 50 min, 50 min, 25 min, 30 min

3. Look for Min and second Min

4. GETRANDOM(min,max)((rand()%(int)(((max)+1)-(min)))+(min)) How in C#

5. GETRANDOM(min,max)((rand()%(int)(((max)+1)-(min)))+(min)) How in C

6. GETRANDOM(min,max)((rand()%(int)(((max)+1)-(min)))+(min)) How

7. Which is more efficient min(min(A)) or min(A(:)) ?

8. Time in seconds to mins and seconds

9. PROC GLIMMIX; dist=binary vs dist=binomial

10. Ant: To dist or not to dist...

11. Create a Dist List that contains a Dist. List

12. statistical information regarding move from CD dist to electronic dist

13. Averaging a series of written text grades i.e. Dist*, Dist, Merit, Pass and Fail

14. Neural Network can't recognize some utterances

15. Do not drift the utterances accordingly, age them nevertheless.

3 post • Page:**1** of **1**