-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
I have audio file sampled 8kHz and I want to extract log AMS feature for it. I run the following code
[y2,Fs] = audioread('city2.wav', [1 256]); % Fs = 8000 for the given file
dObj2 = dataObject(y2, Fs);
% Request amplitude modulation spectrogram (AMS) feaures
requests = 'amsFeatures';
% Parameters of auditory filterbank
fb_type = 'gammatone';
fb_lowFreqHz = 40;
fb_highFreqHz = 10000;
fb_nChannels = 25;
% Parameters of AMS processor
ams_fbType = 'log';
ams_wSizeSec = 32E-3;
ams_hSizeSec = 16E-3;
ams_nFilters = 15;
% Parameters for logarithmically-scaled AMS
parLog = genParStruct('fb_type',fb_type,'fb_lowFreqHz',fb_lowFreqHz,...
'fb_highFreqHz',fb_highFreqHz,'fb_nChannels',fb_nChannels,...
'ams_wSizeSec',ams_wSizeSec,'ams_hSizeSec',ams_hSizeSec,...
'ams_fbType',ams_fbType);
%Create a manager
mObj2 = manager(dObj2,requests,parLog);
% Request processing
mObj2.processSignal();
logAMS2 = dObj2.amsFeatures{1}
logAMS2.plot
and I get error:
Cell contents reference from a non-cell array object.
Error in modulationProc/populateFilters (line 493)
obj(1,nFilter) = genericFilter(pObj.b{end},pObj.a{end},pObj.fs_ds);
Error in modulationProc/prepareForProcessing (line 373)
pObj.Filters = pObj.populateFilters;
Error in manager/addSingleProcessor (line 1024)
newProcessor.prepareForProcessing;
Error in manager/addProcessor (line 584)
newProc = mObj.addSingleProcessor(procName, p, dependency, 1, ii,...
Error in manager (line 154)
mObj.addProcessor(request,p);
Error in DEMO_AMS (line 59)
mObj2 = manager(dObj2,requests,parLog);
after debugging the code I was able to run it with changed default values in modulationProc.m
defaultValues = {'log',...
15,...
40,...
512,... % was 1024
[],...
4,...
32E-3,...
16E-3,...
'rectwin'};
The problem was that the value of variable wn in createFB_Mod.m was getting bigger than 1 at some point in the loop over number of modulation filters
though I'm not sure that changing this default value will not break the whole feature extraction logic
Pls fix the problem or advice how to workaround it
Metadata
Metadata
Assignees
Labels
No labels