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 allclose all

Basic Examples  (2)

Number of samples of an Audio object:

Number of samples of an audio file:

Scope  (1)

Length of a mono audio:

Properties & Relations  (1)

Compute the duration from length and sample rate:

This would be the same as what Duration computes:

Introduced in 2016
 (11.0)