unrecognized function or variable 'helperspeechSpectrograms'
조회 수: 4 (최근 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!