Azzera filtri
Azzera filtri

Getting error while executing audioFeatureExtractor

5 visualizzazioni (ultimi 30 giorni)
Hello sir/madam,
I am getting below error, as I was trying to execute audioFeatureExtractor, kindly help to resolve this error. in the previous matlab trail it was working. I have downloaded new trail and iam getting this berror and I was training it to yamnet plz check
Unable to resolve the name matlabshared.fusionutils.internal.setProperties.
Error in audioFeatureExtractor (line 385)
matlabshared.fusionutils.internal.setProperties(obj,length(varargin),varargin{:});
Error in AQBIR_MEL_BARK_SVM (line 37)
aFE = audioFeatureExtractor("SampleRate",fs, ...
myAudiodb=fullfile(matlabroot,'AudioDB');
ads = audioDatastore(myAudiodb,'IncludeSubfolders',true,'LabelSource','foldernames');
[adsTrain,adsTest] = splitEachLabel(ads,0.8,0.2);
%Read an audio file from the datastore and save the sample rate for later use. Reset the datastore to return the read pointer to the beginning of the data set. Listen to the audio signal and plot the signal in the time domain.
[x,fileInfo] = read(adsTrain);
fs = fileInfo.SampleRate;
reset(adsTrain)
%sound(x,fs) %to make sound
%----------------------------------------------------------------
%Create an audioFeatureExtractor object to extract the Bark spectrum from audio signals.
%Use the same window, overlap length, frequency range, and number of bands as YAMNet was trained on.
%Depending on your transfer learning task, you can modify the input features more or less from the input features YAMNet was trained on.
%Extract Mel features
aFE = audioFeatureExtractor("SampleRate",fs, ...
"melSpectrum",true, ...
"barkSpectrum",true);
setExtractorParams(aFE,"melSpectrum","NumBands",64);
setExtractorParams(aFE,"barkSpectrum","NumBands",64);
%-----------------------------------------------------------------------------
%Extract MelBark spectrograms from the train set. There are multiple Bark spectrograms for each audio signal.
%Replicate the labels so that they are in one-to-one correspondence with the spectrograms.
numSpectrumsPerSpectrogram = 96;
numSpectrumsOverlapBetweenSpectrograms = 48;
numSpectrumsHopBetweenSpectrograms = numSpectrumsPerSpectrogram - numSpectrumsOverlapBetweenSpectrograms;
emptyLabelVector = adsTrain.Labels;
emptyLabelVector(:) = [];
melbarkFeaturesTR = [];
melbarlLabelsTR = emptyLabelVector;
while hasdata(adsTrain)
[audioIn,fileInfo] = read(adsTrain);
%mel
melbarkfeatTR= extract(aFE,audioIn);
melbarkfeatTR = log10(melbarkfeatTR + single(0.001));
[numSpectrums,numBands] = size(melbarkfeatTR);
numSpectrograms = floor((numSpectrums - numSpectrumsPerSpectrogram)/numSpectrumsHopBetweenSpectrograms) + 1;
for hop = 1:numSpectrograms
range = 1 + numSpectrumsHopBetweenSpectrograms*(hop-1):numSpectrumsHopBetweenSpectrograms*(hop-1) + numSpectrumsPerSpectrogram;
melbarkFeaturesTR = cat(4,melbarkFeaturesTR,melbarkfeatTR(range,:));
melbarkLabelsTR = cat(1,melbarkLabelsTR,fileInfo.Label);
end
  1 Commento
jibrahim
jibrahim il 30 Set 2021
Hi Hema,
I suspect you have some kind of install issue.
A few things to try:
  • Execute rehash toolboxreset
  • Execute this command and le t me know what you get:
matlabshared.fusionutils.internal.setProperties
  • In the toolstrip, under preferences->general, uncheck the 'Enable toolbox path cache' check box

Accedi per commentare.

Risposte (0)

Prodotti


Release

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by