AudioTools
Duration
compute the duration of a recording, in seconds
Calling Sequence
Parameters
Description
Examples
Duration(audArray)
audArray
-
Array, Vector, or Matrix containing the audio data
The Duration command computes the duration of an audio recording, in seconds, based on the number of samples, and the samples per second as stored in the attributes of audArray.
The audArray parameter must be a dense, rectangular, one or two dimensional Array, Vector, or Matrix with datatype=float[8],
audiofile≔cat⁡kernelopts⁡datadir,/audio/stereo.wav:
with⁡AudioTools:
aud≔Read⁡audiofile
aud≔Sample Rate22050File FormatPCM File Bit Depth8Channels2Samples/Channel19962Duration0.90531⁢s
Duration⁡aud
11091225
evalf⁡
0.9053061224
See Also
Array
Matrix
Vector
Download Help Document