This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Please add a length attribute to the boundary events. Knowing the length in addition to boundary would make it very simple to highlight text while it is being spoken. Microsoft already supports this in WinRT APIs, and would like to extend this to the web platform in Microsoft Edge. As discussed on the alias, here's a proposed errata: Section 5.2 IDL: Add to SpeechSynthesisEvent: readonly attribute unsigned long charLength; Section 5.2.5 SpeechSynthesisEvent Attributes: Add: charLength attribute This attribute indicates the length of the text (word or sentence) that will be spoken corresponding to this event. This attribute is the length, in characters, starting from this event's charIndex. The user agent must return this value if the speech synthesis engine supports it or the user agent can otherwise determine it, otherwise the user agent must return undefined.
Based on discussions on the mailing list [1], there appears to be general agreement with the proposed errata. If there's no disagreement, I'll add this to the errata page on December 19. [1] https://lists.w3.org/Archives/Public/public-speech-api/2016Nov/0013.html
I'm not sure how an attribute of type unsigned long can hold a value of "undefined" in certain cases. But it can be null if it were nullable: readonly attribute unsigned long? charLength; Can we change that?
This change was never applied to the errata, but I've sent https://github.com/w3c/speech-api/pull/30 to make the changes as verbatim as suggested. Please discuss further there.