AudioLength

AudioLength[audio]

returns the number of samples in the Audio object audio.

Details

  • AudioLength returns the actual number of samples stored in each channel of the Audio object.
  • The duration of an audio is computed as the number of samples divided by the sample rate.

Examples

open all close all

Basic Examples  (2)

Number of samples of an Audio object:

In[2]:=
Click for copyable input
Out[2]=

Number of samples of an audio file:

In[1]:=
Click for copyable input
Out[1]=

Scope  (1)

Properties & Relations  (1)

Introduced in 2016
(11.0)