From 04a8f241fc8ccff87a873be28f2b0c3b893bca2a Mon Sep 17 00:00:00 2001 From: "Alan Ding (Google)" Date: Mon, 13 Jul 2026 21:13:22 -0700 Subject: [PATCH 1/3] Update SpeechRecognitionResult with audio timing attributes Added audioStartTime and audioEndTime attributes to SpeechRecognitionResult interface with explanations as proposed in #191 --- index.bs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/index.bs b/index.bs index 15694a5..5b5da91 100644 --- a/index.bs +++ b/index.bs @@ -120,6 +120,8 @@ This does not preclude adding support for this as a future API enhancement, and
  • The user agent may also give the user a longer explanation the first time speech input is used, to let the user know what it is and how they can tune their privacy settings to disable speech recording if required.
  • To mitigate the risk of fingerprinting, user agents MUST NOT personalize speech recognition when performing speech recognition on a {{MediaStreamTrack}}.
  • + +
  • To mitigate fingerprinting vectors associated with high-precision timing, user agents MUST apply timestamp fuzzing and precision reduction to {{SpeechRecognitionResult/audioStartTime}} and {{SpeechRecognitionResult/audioEndTime}} before exposing these attributes to scripts (e.g. by rounding to 2ms precision).
  • Implementation considerations

    @@ -258,6 +260,8 @@ interface SpeechRecognitionResult { readonly attribute unsigned long length; getter SpeechRecognitionAlternative item(unsigned long index); readonly attribute boolean isFinal; + readonly attribute DOMHighResTimeStamp? audioStartTime; + readonly attribute DOMHighResTimeStamp? audioEndTime; }; // A collection of responses (used in continuous mode) @@ -356,6 +360,16 @@ interface SpeechRecognitionPhrase { +

    SpeechRecognitionResult Attributes

    + +
    +
    audioStartTime attribute
    +
    A nullable {{DOMHighResTimeStamp}} representing the start of the audio segment corresponding to this recognition result, in milliseconds relative to the time origin. Returns null if the underlying recognition engine does not support audio segment start timestamps.
    + +
    audioEndTime attribute
    +
    A nullable {{DOMHighResTimeStamp}} representing the end of the audio segment corresponding to this recognition result, in milliseconds relative to the time origin. Returns null if the underlying recognition engine does not support audio segment end timestamps.
    +
    +

    The group has discussed whether WebRTC might be used to specify selection of audio sources and remote recognizers. See Interacting with WebRTC, the Web Audio API and other external sources thread on public-speech-api@w3.org.

    From ad492533474a6542db9cb168728ad8fef9a45c05 Mon Sep 17 00:00:00 2001 From: "Alan Ding (Google)" Date: Thu, 13 Aug 2026 01:47:39 -0700 Subject: [PATCH 2/3] Update audio segment time references in documentation --- index.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 5b5da91..2c834fd 100644 --- a/index.bs +++ b/index.bs @@ -364,10 +364,10 @@ interface SpeechRecognitionPhrase {
    audioStartTime attribute
    -
    A nullable {{DOMHighResTimeStamp}} representing the start of the audio segment corresponding to this recognition result, in milliseconds relative to the time origin. Returns null if the underlying recognition engine does not support audio segment start timestamps.
    +
    A nullable {{DOMHighResTimeStamp}} representing the start of the audio segment corresponding to this recognition result, in milliseconds relative to the start of the audio stream. Returns null if the underlying recognition engine does not support audio segment start timestamps.
    audioEndTime attribute
    -
    A nullable {{DOMHighResTimeStamp}} representing the end of the audio segment corresponding to this recognition result, in milliseconds relative to the time origin. Returns null if the underlying recognition engine does not support audio segment end timestamps.
    +
    A nullable {{DOMHighResTimeStamp}} representing the end of the audio segment corresponding to this recognition result, in milliseconds relative to the start of the audio stream. Returns null if the underlying recognition engine does not support audio segment end timestamps.

    The group has discussed whether WebRTC might be used to specify selection of audio sources and remote recognizers. From a7558a398403669c8ca1582d305e332eab6a46ae Mon Sep 17 00:00:00 2001 From: "Alan Ding (Google)" Date: Thu, 20 Aug 2026 22:01:04 -0700 Subject: [PATCH 3/3] Respond to review comments - Updated audioStartTime and audioEndTime attributes to use double type instead of nullable DOMHighResTimeStamp. - Modified descriptions to reflect the new data type and precision in seconds. - Removed specific fingerprinting mitigation requirement to leave up to each user agents' implementations. --- index.bs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.bs b/index.bs index 2c834fd..d969dbc 100644 --- a/index.bs +++ b/index.bs @@ -121,7 +121,7 @@ This does not preclude adding support for this as a future API enhancement, and

  • To mitigate the risk of fingerprinting, user agents MUST NOT personalize speech recognition when performing speech recognition on a {{MediaStreamTrack}}.
  • -
  • To mitigate fingerprinting vectors associated with high-precision timing, user agents MUST apply timestamp fuzzing and precision reduction to {{SpeechRecognitionResult/audioStartTime}} and {{SpeechRecognitionResult/audioEndTime}} before exposing these attributes to scripts (e.g. by rounding to 2ms precision).
  • +
  • To mitigate micro-architectural timing attacks and hardware fingerprinting, user agents may reduce the resolution of {{SpeechRecognitionResult/audioStartTime}} and {{SpeechRecognitionResult/audioEndTime}} or introduce jitter, in accordance with the user agent's security and privacy policies (similar to [[HR-TIME-3]] and [[HTML]]).
  • Implementation considerations

    @@ -260,8 +260,8 @@ interface SpeechRecognitionResult { readonly attribute unsigned long length; getter SpeechRecognitionAlternative item(unsigned long index); readonly attribute boolean isFinal; - readonly attribute DOMHighResTimeStamp? audioStartTime; - readonly attribute DOMHighResTimeStamp? audioEndTime; + readonly attribute double audioStartTime; + readonly attribute double audioEndTime; }; // A collection of responses (used in continuous mode) @@ -364,10 +364,10 @@ interface SpeechRecognitionPhrase {
    audioStartTime attribute
    -
    A nullable {{DOMHighResTimeStamp}} representing the start of the audio segment corresponding to this recognition result, in milliseconds relative to the start of the audio stream. Returns null if the underlying recognition engine does not support audio segment start timestamps.
    +
    A {{double}} representing the start time of the audio segment corresponding to this recognition result, in seconds relative to the start of the audio stream consumed by the speech recognizer.
    audioEndTime attribute
    -
    A nullable {{DOMHighResTimeStamp}} representing the end of the audio segment corresponding to this recognition result, in milliseconds relative to the start of the audio stream. Returns null if the underlying recognition engine does not support audio segment end timestamps.
    +
    A {{double}} representing the end time of the audio segment corresponding to this recognition result, in seconds relative to the start of the audio stream consumed by the speech recognizer.

    The group has discussed whether WebRTC might be used to specify selection of audio sources and remote recognizers.