2020-10-30 19:54:44 +00:00
|
|
|
%% lpss_autocorr.m
|
|
|
|
%%
|
|
|
|
%% Load wav and run through autocorr from econometrics toolbox
|
|
|
|
%% Used max range of m lags calculated from sample frequency
|
|
|
|
|
2020-11-03 22:21:19 +00:00
|
|
|
close all;clear all;clc;
|
2020-10-30 19:54:44 +00:00
|
|
|
|
|
|
|
[y, Fs] = audioread('samples/hood_m.wav');
|
2020-11-03 22:21:19 +00:00
|
|
|
L = length(y); % number of samples
|
2020-10-30 19:54:44 +00:00
|
|
|
|
|
|
|
f0 = 60; % low-pitched male speech
|
|
|
|
%f0 = 600; % children
|
|
|
|
|
|
|
|
m = Fs / f0; % from lecture 2, max number of lags required to search
|
|
|
|
|
|
|
|
autocorr(y,'NumLags', m)
|