﻿# MediaRecorder timeslice: blob count is not an exact elapsed-audio clock

MediaRecorder timeslice: blob count is not an exact elapsed-audio clock. A focused voice-infrastructure guide with the documented mechanism, a reproducible validation scenario, evidence and operational limits.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/voice-mediarecorder-timeslice-duration-evidence/
Language: en

MediaRecorder's timeslice asks the browser to deliver recording data in portions; it is not an exact acoustic clock. Counting received Blobs and multiplying by the requested interval can misstate recording duration when delivery is delayed or the final portion is shorter. A speech ingestion path needs a time model that survives irregular event delivery.

## The audio contract

The recording specification treats timeslice as a delivery condition subject to the user agent's minimum and scheduling. Browser tasks and platform behavior can delay dataavailable. The event count therefore does not establish exact elapsed recording time, and a Blob boundary is not a guaranteed utterance boundary. Final delivery and requestData can also produce portions that do not fit an assumed uniform interval. Keep delivery cadence distinct from the media duration established by the recording's actual content and supported timing metadata.

## Implementation details

Store portion order and delivery observations without assigning duration solely from the requested interval. Use a declared recording-time measurement for the interface and validated decoded sample accounting for the resulting artifact when appropriate. Keep pauses, stop and final data delivery in the lifecycle record. Do not schedule model chunks by pretending that every Blob is an independently playable fixed-duration audio file. If the ingestion protocol needs fixed acoustic windows, decode through a supported complete or streaming format path and build those windows from actual audio units.

## A constructed validation case

Record a known signal while introducing controlled event-loop delay, then stop between nominal delivery boundaries. Compare requested timeslice, event arrival times, Blob count and the completed recording's decoded duration. A deliberately count-times-interval implementation should disagree in at least a constructed irregular-delivery case. Acceptance requires accurate classification of delivery timing and a duration method with a stated boundary, not exact periodic JavaScript callbacks. Preserve the complete ordered portions so a duration discrepancy can be investigated without guessing which event represented which assumed second.

## Operational limits

This does not prove that recording never loses data under overload. It prevents one unreliable duration estimate from hiding the distinction between delayed delivery and actual missing audio. Evaluate capture continuity and model latency separately after the recording timeline is defined.

## Primary references

[Recording Spec](https://www.w3.org/TR/mediastream-recording/); [Mdn Recorder Data](https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/dataavailable_event).

This is a proposed voice-system validation, not an executed Retrivium benchmark. Preserve the implementation version and unresolved outcomes; interface documentation does not establish the quality or timing of a deployed voice service.

## Related reading

[Audio resampling for datasets: keep timestamps aligned when sample counts change](/journal/data-guide-audio-resample-time-labels/); [Mimi streaming frames: network chunks must be buffered before codec input](/journal/fg2-mimi-streaming-frame-buffer-contract/).
