Dawn@4
|
1 function [H1H2, H2H4] = func_GetH1H2_H2H4(H1, H2, H4, Fs, F0, F1, F2, B1, B2)
|
Dawn@4
|
2 % [H1H2, H2H4] = func_GetH1H2_H2H4(H1, H2, H4, Fs, F0, F1, F2, B1, B2)
|
Dawn@4
|
3 % Input: H1, H2, H4, vectors
|
Dawn@4
|
4 % Fs - sampling frequency
|
Dawn@4
|
5 % F0 - vector of fundamental frequencies
|
Dawn@4
|
6 % Fx, Bx - vectors of formant frequencies and bandwidths
|
Dawn@4
|
7 % Output: H1A1, H1A2, H1A3 vectors
|
Dawn@4
|
8 % Notes: Function produces the corrected versions of the parameters. They
|
Dawn@4
|
9 % are stored as HxHx for compatibility reasons. Use func_buildMData.m to
|
Dawn@4
|
10 % recreate the mat data with the proper variable names.
|
Dawn@4
|
11 % Also note that the bandwidths from the formant trackers are not currently
|
Dawn@4
|
12 % used due to the variability of those measurements.
|
Dawn@4
|
13 %
|
Dawn@4
|
14 % Author: Yen-Liang Shue, Speech Processing and Auditory Perception Laboratory, UCLA
|
Dawn@4
|
15 % Copyright UCLA SPAPL 2009
|
Dawn@4
|
16
|
Dawn@4
|
17
|
Dawn@4
|
18 if (nargin == 7)
|
Dawn@4
|
19 B1 = func_getBWfromFMT(F1, F0, 'hm');
|
Dawn@4
|
20 B2 = func_getBWfromFMT(F2, F0, 'hm');
|
Dawn@4
|
21 end
|
Dawn@4
|
22
|
Dawn@4
|
23
|
Dawn@4
|
24 H1_corr = H1 - func_correct_iseli_z(F0, F1, B1, Fs);
|
Dawn@4
|
25 H1_corr = H1_corr - func_correct_iseli_z(F0, F2, B2, Fs);
|
Dawn@4
|
26 H2_corr = H2 - func_correct_iseli_z(2*F0, F1, B1, Fs);
|
Dawn@4
|
27 H2_corr = H2_corr - func_correct_iseli_z(2*F0, F2, B2, Fs);
|
Dawn@4
|
28 H4_corr = H4 - func_correct_iseli_z(4*F0, F1, B1, Fs);
|
Dawn@4
|
29 H4_corr = H4_corr - func_correct_iseli_z(4*F0, F2, B2, Fs);
|
Dawn@4
|
30
|
Dawn@4
|
31 H1H2 = H1_corr - H2_corr;
|
Dawn@4
|
32 H2H4 = H2_corr - H4_corr;
|
Dawn@4
|
33
|
Dawn@4
|
34
|
Dawn@4
|
35
|