필터 지우기
필터 지우기

Error using audioread function in MATLAB. It gives error while using .wav or .mp3.

조회 수: 64 (최근 30일)
>> [y,Fs] = audioread('C:\Users\sat33\Documents\MATLAB\audio1.wav')
*** audioread: problem reading C:\Users\sat33\Documents\MATLAB\audio1.wav - returning empty waveform
y =
[]
Fs =
0
  댓글 수: 3
Satwik Dutta
Satwik Dutta 2018년 12월 10일
Hi Walter,
I am using MATLAB 2018b & Windows 10 OS.
I am able to run audioinfo(), just incase it helps-
>> info = audioinfo('audio1.wav')
info =
struct with fields:
Filename: 'C:\Users\sat33\Documents\MATLAB\audio1.wav'
CompressionMethod: 'Uncompressed'
NumChannels: 1
SampleRate: 8000
TotalSamples: 14522333
Duration: 1.8153e+03
Title: '20Label'
Comment: []
Artist: []
BitsPerSample: 16
Walter Roberson
Walter Roberson 2018년 12월 10일
편집: Walter Roberson 2018년 12월 10일
Can you attach the .wav file for us to test?
Also check in case there are permission problems with the file.

댓글을 달려면 로그인하십시오.

채택된 답변

Astha Singh
Astha Singh 2018년 12월 12일
Hello Satwik,
This error might be the result of a third-party "audioread" function available on the internet, which is possibly shadowing the built-in MATLAB "audioread" function.
Verify you are using the built-in “audioread” function by executing the following line in the MATLAB Command Window:
>> which('audioread', '-all')
The only path displayed should be:
matlabroot\toolbox\matlab\audiovideo\audioread.m
Note that "matlabroot" in the path shown above will be replaced by the path of the folder where MATLAB is installed in your system.
If more than one path is displayed, a third-party function is taking precedence over the built-in "audioread" function.
If you want to return to using the built-in function, you must remove the third-party function from your MATLAB search path by executing the following lines in the Command Window:
>> rmpath(fileparts(which('audioread')))
>> savepath
  댓글 수: 17
hanin t
hanin t 2023년 10월 6일
how if 'audioread' not found? how to fix it?
Walter Roberson
Walter Roberson 2023년 10월 7일
audioread was added to basic MATLAB (no toolbox needed) in R2012b.
If audioread() cannot be found in your system, there are several possibilities:
  • you might be using R2012a or earlier; or
  • your MATLAB installation might be corrupt or your MATLAB path might have removed some important paths. If either of these are true you are probably going to end up re-installing MATLAB; or
  • perhaps what you are passing to audioread() is not a string or character vector (or numeric value, or cell array) and is instead a class object, and the real complaint is not about audioread() not being found but rather saying no method audioread for that particular class. However, when I tested this, I was not able to get such an error: the way audioread() is designed it should be found on the path for any class (and then when called, audioread() checks whether the input is valid)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by