(octave.info)Audio File Utilities
33.1 Audio File Utilities
=========================
The following functions allow you to read, write and retrieve
information about audio files. Various formats are supported including
wav, flac and ogg vorbis.
-- : INFO = audioinfo (FILENAME)
Return information about an audio file specified by FILENAME.
The output INFO is a structure containing the following fields:
‘Filename’
Name of the audio file.
‘CompressionMethod’
Audio compression method. Unused, only present for
compatibility with MATLAB.
‘NumChannels’
Number of audio channels.
‘SampleRate’
Sample rate of the audio, in Hertz.
‘TotalSamples’
Number of samples in the file.
‘Duration’
Duration of the audio, in seconds.
‘BitsPerSample’
Number of bits per sample.
‘BitRate’
Audio bit rate. Unused, only present for compatibility with
MATLAB.
‘Title’
"Title" audio metadata value as a string, or empty if not
present.
‘Artist’
"Artist" audio metadata value as a string, or empty if not
present.
‘Comment’
"Comment" audio metadata value as a string, or empty if not
present.
See also: Note: audioread, *note audiowrite:
XREFaudiowrite.
-- : [Y, FS] = audioread (FILENAME)
-- : [Y, FS] = audioread (FILENAME, SAMPLES)
-- : [Y, FS] = audioread (FILENAME, DATATYPE)
-- : [Y, FS] = audioread (FILENAME, SAMPLES, DATATYPE)
Read the audio file FILENAME and return the audio data Y and
sampling rate FS.
The audio data is stored as matrix with rows corresponding to audio
frames and columns corresponding to channels.
The optional two-element vector argument SAMPLES specifies starting
and ending frames.
The optional argument DATATYPE specifies the datatype to return.
If it is "native", then the type of data depends on how the data is
stored in the audio file.
See also: Note: audiowrite, *note audioformats:
XREFaudioformats, Note: audioinfo.
-- : audiowrite (FILENAME, Y, FS)
-- : audiowrite (FILENAME, Y, FS, NAME, VALUE, ...)
Write audio data from the matrix Y to FILENAME at sampling rate FS
with the file format determined by the file extension.
Additional name/value argument pairs may be used to specify the
following options:
‘BitsPerSample’
Number of bits per sample. Valid values are 8, 16, 24, and
32. Default is 16.
‘BitRate’
Valid argument name, but ignored. Left for compatibility with
MATLAB.
‘Quality’
Quality setting for the Ogg Vorbis compressor. Values can
range between 0 and 100 with 100 being the highest quality
setting. Default is 75.
‘Title’
Title for the audio file.
‘Artist’
Artist name.
‘Comment’
Comment.
See also: Note: audioread, *note audioformats:
XREFaudioformats, Note: audioinfo.
-- : audioformats ()
-- : audioformats (FORMAT)
Display information about all supported audio formats.
If the optional argument FORMAT is given, then display only formats
with names that start with FORMAT.
See also: Note: audioread, *note audiowrite:
XREFaudiowrite.
automatically generated by info2www version 1.2.2.9