<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>30004</bug_id>
          
          <creation_ts>2016-11-14 20:54:46 +0000</creation_ts>
          <short_desc>Please add &quot;length&quot; attribute to boundary events</short_desc>
          <delta_ts>2018-08-06 10:46:13 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Speech API</product>
          <component>Speech API</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jerry Smith">jdsmith</reporter>
          <assigned_to name="Glen Shires">gshires</assigned_to>
          <cc>eitan</cc>
    
    <cc>mike</cc>
    
    <cc>philip</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>128169</commentid>
    <comment_count>0</comment_count>
    <who name="Jerry Smith">jdsmith</who>
    <bug_when>2016-11-14 20:54:46 +0000</bug_when>
    <thetext>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&apos;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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128194</commentid>
    <comment_count>1</comment_count>
    <who name="Glen Shires">gshires</who>
    <bug_when>2016-11-16 21:42:46 +0000</bug_when>
    <thetext>Based on discussions on the mailing list [1], there appears to be general agreement with the proposed errata.

If there&apos;s no disagreement, I&apos;ll add this to the errata page on December 19.

[1] https://lists.w3.org/Archives/Public/public-speech-api/2016Nov/0013.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128251</commentid>
    <comment_count>2</comment_count>
    <who name="Eitan Isaacson">eitan</who>
    <bug_when>2016-11-23 03:46:27 +0000</bug_when>
    <thetext>I&apos;m not sure how an attribute of type unsigned long can hold a value of &quot;undefined&quot; in certain cases.

But it can be null if it were nullable:
readonly attribute unsigned long? charLength;

Can we change that?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>129314</commentid>
    <comment_count>3</comment_count>
    <who name="Philip Jägenstedt">philip</who>
    <bug_when>2018-08-06 10:46:13 +0000</bug_when>
    <thetext>This change was never applied to the errata, but I&apos;ve sent https://github.com/w3c/speech-api/pull/30 to make the changes as verbatim as suggested. Please discuss further there.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>