unrecognized function or variable 'helperspe​echSpectro​grams'

4 ビュー (過去 30 日間)
Utsav Pandya
Utsav Pandya 2022 年 3 月 9 日
コメント済み: Adam Danz 2022 年 7 月 13 日
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
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
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 ExchangeSpeech Recognition についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by