Stats
Analyses a decoded s16le PCM frame and returns human-readable metrics.
All amplitude values are normalised to 0.0–1.0 relative to the s16 full-scale range (32768). dBFS follows the standard convention: 0.0 dBFS is full scale, silence is -math.huge.
Functions
Section titled “Functions”Stats . stats ( frame , sampleRate , channels ) -> FrameStats
Analyses frame (raw s16le PCM) and returns a FrameStats breakdown.
sampleCount- total s16 samples across all channelsdurationMs- playback duration in millisecondspeakAmplitude- loudest sample, normalised 0.0–1.0rms- root-mean-square level, normalised 0.0–1.0dBFS- RMS level in decibels relative to full scale (≤ 0; -math.huge for silence)dcOffset- mean sample value normalised -1.0–1.0 (non-zero suggests a DC bias)clippedSamples- samples sitting at ±32767/32768 (full scale saturation)