Waveform peaks of a whole recording: max-abs per bucket, normalized by the global max (0..1). Same
semantics as the peaks the browser used to compute at capture time for its whole-call WAV upload,
so a viewer renders an assembled recording exactly like one uploaded before #5294.
Parameters
pcm: Int16Array
Mono PCM16 samples.
buckets: number = PEAK_BUCKETS
Target bucket count (default 600); a shorter buffer yields one bucket per sample.
Returns number[]
The peaks, or [] for an empty or all-silent buffer.
Waveform peaks of a whole recording: max-abs per bucket, normalized by the global max (0..1). Same semantics as the peaks the browser used to compute at capture time for its whole-call WAV upload, so a viewer renders an assembled recording exactly like one uploaded before #5294.