Error in running built-in command "audioread"

3 Ansichten (letzte 30 Tage)
Abdul Gaffar
Abdul Gaffar am 4 Jul. 2021
Bearbeitet: Image Analyst am 4 Jul. 2021
The problem originates by running a code, which was found on MathWorks help forum, and is:
[filename, pathname] = uigetfile('*.wav', 'Pick an audio');
% ----------------------------------------------------------------------------------------%
Now, whenever I am running audioread command for reading a .wav file, it shows the following error:
'audioread' is not found in the current folder or on the MATLAB path, but exists in:
C:\Program Files\Polyspace\R2019b\toolbox\matlab\audiovideo
Change the MATLAB current folder or add its folder to the MATLAB path.
Error in Sterio2mono (line 9)
[y, Fs] = audioread('dec_splat.wav'); % read audio file to array
% -----------------------------------------------------------%
Moreover, when I use the option add its folder to the MATLAB path, then it (audioread command) works. But, when I close the MATLAB and re-open the MATLAB, the same error comes.
Why is this happening, I don't know?

Antworten (1)

Image Analyst
Image Analyst am 4 Jul. 2021
Bearbeitet: Image Analyst am 4 Jul. 2021
You should see this:
>> which -all audioread
C:\Program Files\MATLAB\R2020b\toolbox\matlab\audiovideo\audioread.m
After you click the Set Path button on the Home tab of the tool ribbon, and click the Add folder button, you need to click the "Save" button and then click the Close button. You probably just clicked Close without clicking Save before, so it was added to the path only for that session of MATLAB, not permanently.
  2 Kommentare
Abdul Gaffar
Abdul Gaffar am 4 Jul. 2021
Bearbeitet: Abdul Gaffar am 4 Jul. 2021
Again, error generates:
which audioread
'audioread' not found
% ------------------------%
which audioread -all
'audioread' not found
% ----------------------%
which -all audioread
'audioread' not found
Image Analyst
Image Analyst am 4 Jul. 2021
Bearbeitet: Image Analyst am 4 Jul. 2021
Manually look for C:\Program Files\MATLAB\R2019b\toolbox\matlab\audiovideo\audioread.m. Is it there? If not, reinstall MATLAB because it did not install properly. It should be there. It's part of base MATLAB. If it still doesn't work, call tech support for free installation help.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Audio I/O and Waveform Generation finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by