-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathmain_extract_f0.m
More file actions
25 lines (22 loc) · 799 Bytes
/
main_extract_f0.m
File metadata and controls
25 lines (22 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
clear all;
%%%%%%%%%%%%%%%%%%%%%%%%%
%author: zhaoshuaijiang
%date: 20141223
%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%Settings%%%%%%%%%%%%
opts.F0frameUpdateInterval = 5; %frame shift(ms)
opts.spectralUpdateInterval = 5; %frame shift(ms)
opts.F0searchLowerBound = 50; %F0 lower bound
opts.F0searchUpperBound = 600; %F0 upper bound
fs = 16000;
RAW_PATH = './raw/';
F0_PATH = './f0/'; mkdir(F0_PATH);
%%%%%%%%%%%%Settings%%%%%%%%%%%%
fns_all = Utils_getFilenames(RAW_PATH, '.raw');
for i = 1:length(fns_all)
fprintf('Extract the %d th file\n',i);
raw = Utils_readFeature([RAW_PATH fns_all{i} '.raw'],'int16',1); % int16 not short
[f0raw,ap]=exstraightsource(raw,fs,opts);
%sp = exstraightspec(raw,f0raw,fs);
save([F0_PATH fns_all{i} '.f0'],'-ascii','f0raw');
end