File Exchange

image thumbnail

audioread - unified audio file input function

version 1.2 (904 KB) by

audioread provides a single, unified function for reading audio files in wav, mp3, aac, flac...

23 Downloads

Updated

View License

audioread provides a single, unified function for reading audio files in a range of different file formats, including wav, mp3, aac, flac, AIFF, etc. In most cases, access is actually provided by external binaries, but this is hidden within audioread (and its subfunctions). The idea is to make your code independent of the kind of audio files used as input.

In addition, audioread provides support for common modifications performed during sound input, namely resampling (changing the sampling rate), casting multi-channel signals to mono, and loading only a limited time range of the sound. Care has been taken to ensure that short subregions of very large soundfiles can be read with the minimum of memory overhead (for instance, without having to load in the entire soundfile at any time.

Comments and Ratings (4)

Tony TANG

no aif or aiff

Dan Ellis

Dan Ellis (view profile)

Sorry, I didn't realize that resample() was only available when the Signal Processing Toolbox is installed.

If even the demo file is not operating, I don't know what kind of rate can ever be expressed...
:'(

??? Undefined function or method 'resample' for input arguments of type 'double'.

Error in ==> wavread_downsamp at 72
  dd = resample(dd,1,DS);

Error in ==> audioread at 81
    [D,SR] = wavread_downsamp(FN,N,FORCEMONO,ds);

Error in ==> demo_audioread at 26
[d,sr] = audioread('piano.wav');

JY

JY (view profile)

Updates

1.2

FIxed bug reading flac files with downsampling that would truncate 2nd half of file.

1.1

Better handling of errors in external programs

MATLAB Release
MATLAB 7.11 (R2010b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video