Undefined function error in Audio Toolbox and Deeplearning Toolbox

조회 수: 9(최근 30일)
Yifan Dong
Yifan Dong 2021년 9월 22일
댓글: Yifan Dong 2021년 9월 23일
I am trying to run a pretrained network on speech command recognition demonstrated on this page:
My code is here, it is simply a copy of what the page instructs:
load('commandNet.mat')
[x,fs] = audioread('stop_command.flac');
sound(x,fs)
auditorySpect = helperExtractAuditoryFeatures(x,fs);
command = classify(trainedNet,auditorySpect)
and I got these warnings and a error:
Warning: Unable to load instances of class weightedClassificationLayer into a heterogeneous array. The definition of
weightedClassificationLayer could be missing or contain an error. Default objects will be substituted.
Warning: While loading an object of class 'SeriesNetwork':
Error using 'predict' in Layer nnet.cnn.layer.MissingLayer. The function threw an error and could not be executed.
Undefined function 'helperExtractAuditoryFeatures' for input arguments of type 'double'.
Error in T2 (line 4)
auditorySpect = helperExtractAuditoryFeatures(x,fs);
Could any one tell why I got this error?

채택된 답변

Brian Hemmat
Brian Hemmat 2021년 9월 22일
Hi Yifan,
To run the example, you'll need to open the example using this command:
openExample('deeplearning_shared/DeepLearningSpeechRecognitionExample')
Alternatively, you can click the button on the top right of the example.
That command will open a copy of the example into a new location that includes all necessary helper files. You can step through the example from there.
HTH,
Brian

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by