v153 · speechrecognitionresult timestamps
Result-object capability probe
Feature-detecting these attributes has a trap: SpeechRecognitionResult is declared [LegacyNoInterfaceObject], so there is no window.SpeechRecognitionResult constructor to probe. You must inspect a live result instance. This demo runs the real checks and shows the correct detection recipe alongside the one that silently fails.
null, which is not the same as “unsupported”.
Static surface probe
| Check | Result | Value |
|---|---|---|
| Press “Probe the surface”. | ||
Live result inspection
The only reliable check is on a real SpeechRecognitionResult. This starts a short recognition and inspects the first result's own properties — honestly reporting whatever your engine returns.
detection recipe
Does not work — there is no constructor, so this throws or is always false:
'audioStartTime' in SpeechRecognitionResult.prototype // ReferenceError: not defined
Works — probe a real result instance inside onresult:
recognition.onresult = (event) => {
const result = event.results[event.resultIndex];
const hasTimestamps = 'audioEndTime' in result; // capability
const timed = hasTimestamps && result.audioEndTime !== null; // actually populated
};
Values are rounded to 2 ms precision to reduce fingerprinting (mirroring HTMLMediaElement.currentTime), so do not expect sub-millisecond timing.