Search code examples
matlabmp3

Using audioread on a MP3 File in Matlab


I have some trouble to read mp3 file in matlab. There is the function audioread that is supposed to do the job, but it doesn't work.

>> [x Fs] = audioread('Corner.mp3');
*** audioread: problem reading Corner.mp3:Too many input arguments.
*** audioread: returning empty waveform

The function DOES work for WAV files without problem. I really don't know where do problem comes from, i searched here and using google, without success.

Have you, guys, any idea ?

EDIT : Here is the mp3 file : http://www8.zippyshare.com/v/zZQpECRF/file.html

EDIT 2 : I am using Matlab 7.12.0 (R2011a) on a Windows 8 laptop.

EDIT 3 : It seems that my Matlab version is too old. Now I'm using the R2014a version and it works perfecly !


Solution

  • Your answer is not reproducible in Matlab 2015a. As hiandbaii your Matlab version is too old. Use your MP3 file and update to a newer version of Matlab and it will work.

    >> [x Fs] = audioread('Corner.mp3');
    >> Fs
    Fs =
           44100
    >> size(x)
    ans =
        12899250           2