No BSD License
-
f_DECODER (aCoeff, pitch_plot...
DECODER PORTION
-
f_ENCODER(x, fs, M);
ENCODER PORTION
-
f_GAIN (e, voiced_b, pitch_pl...
function for calc gain per frame
-
f_SYN_UV (aCoeff, gain, frame...
a function of f_DEOCDER
-
f_SYN_V (aCoeff, gain, frame_...
a function of f_DEOCDER
-
f_VOICED(x, fs, fsize);
function_main of voiced/unvoiced detection
-
func_lev_durb (y, M);
function of levinsonDurbin__Hamza
-
func_pitch (y,fs)
-
func_vd_msf (y)
function of "voicingDetector_magnitude_sum_function__hamza"
-
func_vd_zc (y)
function of "voicingDetector_zero_crossing_detector__hamza"
-
MAIN.m
-
PG_vs_M_graph_for_lev_durb.m
-
View all files
|
|
| func_pitch (y,fs)
|
% min_freq = 80;
% max_freq = 300;
%
% period_max = round(fs / min_freq);
% period_min = round(fs / max_freq);
function pitch_period = func_pitch (y,fs)
clear pitch_period;
period_min = round (fs .* 2e-3); %=total data points in 2ms of "x"
%as, min period of a female voice frame = 2ms
period_max = round (fs .* 20e-3); %as, max period of a male voice frame = 20ms
%BODY OF PROGRAM
R=xcorr(y);
[R_max , R_mid]=max(R); %R_max is the peak of "R", R_mid=(index of R_max)=the
%midpoint of "R"
pitch_per_range = R ( R_mid + period_min : R_mid + period_max );
[R_max, R_mid] = max(pitch_per_range);
pitch_period = R_mid + period_min;
|
|
Contact us at files@mathworks.com