AudioData

AudioData[audio]

gives an array of audio samples.

AudioData[audio,"type"]

gives an array of audio samples converted to the specified "type".

Details

  • By default, AudioData[audio] normalizes values to lie between and 1.
  • For single-channel mono audio, AudioData returns a 1D array of data.
  • For multichannel audio, AudioData returns a 2D array of data, where rows correspond to channels.
  • The number of samples in each channel is equivalent to the duration of the audio multiplied by the sample rate.
  • Possible types specified by AudioData[audio,"type"] are:
  • "SignedInteger8"signed 8-bit integers from through
    "SignedInteger16"signed 16-bit integers from through
    "SignedInteger32"signed 32-bit integers from through
    "Real32"single-precision real (32 bit)
    "Real"double-precision real (64 bit)
  • AudioData[audio,Automatic] is equivalent to AudioData[audio,AudioType[audio]].

Examples

open allclose all

Basic Examples  (1)

Extract data from an Audio object:

In[2]:=
Click for copyable input
Out[2]//Short=
In[3]:=
Click for copyable input
Out[3]=

Scope  (1)

Generalizations & Extensions  (1)

Applications  (3)

See Also

Audio  SampleRate  Duration  AudioType  SampledSoundList  ListPlay

Introduced in 2016
(11.0)