I am getting error in "Denoise Speech Using Deep Learning Network" example?

I am getting the first error here. I am making this example using TIMIT data. The sounds in TIMIT are 16kHz and I want it to stay that way. But here it says it needs to be converted from 48kHz to 8kHz. How can I customize this? I'm putting the error below.
src = dsp.SampleRateConverter("InputSampleRate",inputFs, ...
"OutputSampleRate",fs, ...
"Bandwidth",7920);
audio = read(adsTrain);
decimationFactor = inputFs/fs;
L = floor(numel(audio)/decimationFactor);
audio = audio(1:decimationFactor*L);
audio = src(audio);
reset(src)
Error
Unable to load bundle binary
D:\bin\win64\builtins\shared_system_coreblocks\mwsystemobject_coreblocksmcos_builtinimpl.dll. Error: 126: not
connected
This is the second error I got. I have no idea why it happens how can I fix this error?
reset(adsTrain)
T = tall(adsTrain)
[targets,predictors] = cellfun(@(x)HelperGenerateSpeechDenoisingFeatures(x,noise,src),T,"UniformOutput",false);
[targets,predictors] = gather(targets,predictors);
predictors = cat(3,predictors{:});
noisyMean = mean(predictors(:));
noisyStd = std(predictors(:));
predictors(:) = (predictors(:) - noisyMean)/noisyStd;
targets = cat(2,targets{:});
cleanMean = mean(targets(:));
cleanStd = std(targets(:));
targets(:) = (targets(:) - cleanMean)/cleanStd;
predictors = reshape(predictors,size(predictors,1),size(predictors,2),1,size(predictors,3));
targets = reshape(targets,1,1,size(targets,1),size(targets,2));
inds = randperm(size(predictors,4));
L = round(0.99 * size(predictors,4));
trainPredictors = predictors(:,:,:,inds(1:L));
trainTargets = targets(:,:,:,inds(1:L));
validatePredictors = predictors(:,:,:,inds(L+1:end));
validateTargets = targets(:,:,:,inds(L+1:end));
ERROR
Evaluating tall expression using the Local MATLAB Session:
- Pass 1 of 1: 0% complete
Evaluation 0% complete
Error using tall/cellfun (line 19)
Unrecognized function or variable 'noise'.
Learn more about errors encountered during GATHER.
Error in tall/gather (line 50)
[varargout{:}, readFailureSummary] = iGather(varargin{:});
PLEASE HELP ME

 Accepted Answer

The second error is being described by these lines in the output:
Error using tall/cellfun (line 19)
Unrecognized function or variable 'noise'.
This line of your code:
[targets,predictors] = cellfun(@(x)HelperGenerateSpeechDenoisingFeatures(x,noise,src),T,"UniformOutput",false);
is calling cellfun and giving it an anonymous function that refers to the variable noise. However you have not defined the noise variable and hence the error. You need to create a noise input, e.g. by loading an mp3 lof noise like the example does.
The first error you see is more unusual. I think that "Error: 126: not connected" is a Windows error message that means the Matlab library file that it refers to cannot be loaded. Does that dll file exist on your hard drive? It is also possible that the file has been corrupted, or maybe that antivirus is preventing access to it. If it is corrupted then you will probably need to try reinstalling Matlab to fix it.

4 Comments

I'm trying to fit this example to my own data. I use babble.mat as noise and I wrote as
noise=babble;
Matlab is installed in the C file. But the audio files are located in D. Can this problem be solved if I move the audio files to C?
Location of data files should not matter. However if babble is a mat file (saved data, not code) then you need to use the load command: load("babble"), This will create variables that were originally saved inside babble and you will need to ensure that there is one called "noise".
You can verify what the program is doing in this respect by debugging your code and inspecting the value of the noise variable before the line that calls cellfun.
Incidentally, the "error 126" issue indicated that Matlab was installed on the D: drive - in fact, in the root directory of the drive which is unusual. Maybe that is more evidence of an installation problem.
Can I do this example with RNN as well? What do I need to add or change other than the lstm Layer?

Sign in to comment.

More Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!