unrecognized function or variable 'helperspeechSpectrograms'
3 次查看(过去 30 天)
显示 更早的评论
I am using the helperspeechSpectrogram function in a Speech Emotion Recognition progam, and I have the toolboxes installed required for this function.
I am using another function, helperReadSPData, from the same toolboxes which works without errors. if anyone could help me out with what is going wrong here, it would be a big help.
segmentDuration=60000*(1/16000);
frameDuration=0.046;
hopDuration=0.023;
numBands=128;
epsil=1e-6;
scadts_Train=transform(adsTrain,@(x)helperReadSPData(x))
XTrain=helperspeechSpectrograms(scadts_Train,segmentDuration,frameDuration,hopDuration,numBands);
scadts_Test=transform(adsTest,@(x)helperReadSPData(x));
XTest=helperspeechSpectrograms(scadts_Test,segmentDuration,frameDuration,hopDuration,numBands);
5 个评论
Rimsha Muzaffar
2022-7-13
should we take another class to define this function or define them in same
this one na
function x = helperReadSPData(x)
% This function is only for use Wavelet Toolbox examples. It may change or
% be removed in a future release.
N = numel(x);
if N > 8192
x = x(1:8192);
elseif N < 8192
pad = 8192-N;
prepad = floor(pad/2);
postpad = ceil(pad/2);
x = [zeros(prepad,1) ; x ; zeros(postpad,1)];
end
x = x./max(abs(x));
end
I am actually confused where to write this
Adam Danz
2022-7-13
MATLAB has to know that helperReadSPData exists. One way to do that is to put the function in an m-file and store the m-file on your matlab path (perhaps in the same folder you are working in). Another way to do that is to define the function at the end of the m-file you're working in. For more info, see Create Function in Files from the documentation.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Speech Recognition 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!