-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcdds.m
More file actions
52 lines (45 loc) · 1.2 KB
/
Copy pathcdds.m
File metadata and controls
52 lines (45 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
function varargout = cdds
dl={'C:\Users\UCUSER\', 'e:','z:','f:','c:', '/users/cais', '/media/DATA', 'e:/scai','e:/NT_Data/scai/','a:','b:','d:','g:','h:','i:','j:','k:','l:','m:','n:',...
'o:','p:','q:','r:','s:','t:','u:','v:','w:','x:','y:'};
dirFound=0;
for i1=1:length(dl)
if isdir(fullfile([dl{i1}],'speechres'))
dirFound=1;
break;
end
end
if dirFound==0;
fprintf('speechres dir not found. Given up.\n');
return
end
dl=[dl{i1}];
if nargout == 0
disp(['Found speechres dir under ',dl]);
end
if nargout == 0
cd(fullfile(dl,'speechres'));
elseif nargout == 1
varargout{1} = fullfile(dl,'speechres');
end
% audapterPath = which('TransShiftMex');
% if ~isempty(audapterPath)
% dns = splitstring(audapterPath, '\');
%
% t_dir = '';
% for i1 = 1 : length(dns) - 4
% t_dir = fullfile(t_dir, dns{i1});
% end
% t_dir = fullfile(t_dir, 'mcode');
% cd(t_dir);
% end
audapterPath = which('Audapter');
if ~isempty(audapterPath)
dns = splitstring(audapterPath, '\');
t_dir = '';
for i1 = 1 : length(dns) - 5
t_dir = fullfile(t_dir, dns{i1});
end
t_dir = fullfile(t_dir, 'scrama', 'mcode');
cd(t_dir);
end
return