Tuesday, August 20, 2013

Audio File Reading and Writing

I have implemented audioinfo and audioread and they should work exactly as in MATLAB. Here is an example session.

octave:1> audioinfo('technical_difficulties.wav')
ans =

  scalar structure containing the fields:

    Filename = technical_difficulties.wav
    CompressionMethod =
    NumChannels =  2
    SampleRate =  44100
    TotalSamples =  305576
    Duration =  6.9292
    BitsPerSample =  16
    BitRate = -1
    Title =
    Artist =
    Comment =

octave:2> [y, Fs] = audioread('technical_difficulties.wav');
octave:3> player = audioplayer(y, Fs);
octave:4> play(player);
For further information about this functionality refer to MATLAB manual pages on these functions: here and here.


  1. Hello You said that your code is/can be implement in Octave. But when i see octave they arren't:
    See line 542 - 547
    How works this?? Thanks

  2. Hi Vytautas, why you don't merge this octave codes to official octave audio? it will be very helpful for us.

  3. Hi, i just tried your "audio" in Octave under Ubuntu-Studio.. The playing works fine, but I cannot manage any recording. Do you have a idea?
    yours Rainer