Skip to content

Commit

Permalink
Add a note for voice activity explanation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jianjunz committed Jul 2, 2024
1 parent 2bb2843 commit 7240fbe
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,8 @@ platform UI or media keys, thereby improving the user experience.
</li>
<li>
<dfn enum-value for=MediaSessionAction>voiceactivity</dfn>:
the action's intent is to notify the action handler that a voice
activity is started.
the action's intent is to notify the web page that a voice activity
has been detected by the microphone.
</li>
</ul>
</p>
Expand Down Expand Up @@ -547,17 +547,30 @@ platform UI or media keys, thereby improving the user experience.
steps defined to [$set a track's muted state$].
</p>
<p>
A user agent MUST invoke {{MediaSessionActionHandler}} for
{{MediaSessionAction/voiceactivity}} only when the voice activity is
detected from a microphone with one or more live {{MediaStreamTrack}}s. A
user agent MAY ignore a {{MediaSessionAction/voiceactivity}} action if all
A user agent MUST invoke the {{MediaSessionActionHandler}} for
{{MediaSessionAction/voiceactivity}} only when voice activity is detected
from a microphone with one or more live {{MediaStreamTrack}}s. A user
agent MAY ignore a {{MediaSessionAction/voiceactivity}} action if all
{{MediaStreamTrack}}s associated with the source are not
{{MediaStreamTrack/muted}}. It is RECOMMENDED for user agents to set a
minimal interval for invoking {{MediaSessionActionHandler}} for
{{MediaSessionAction/voiceactivity}} based on privacy and power efficiency
policies.
</p>

<p class=note>
{{MediaSessionAction/voiceactivity}} only indicates the start of a voice
activity. Application may display a notification if the user is speaking
while the {{MediaStreamTrack}} is muted, or start an {{AudioWorklet}} for
audio processing. No action is defined for the end of a voice activity.
Unlike other actions which are explicitely triggered by the user,
{{MediaSessionAction/voiceactivity}} also depends on the voice activity
detection algorithm of the user agent or the system. For privacy and power
efficiency concern, web page may not be notified if the second voice
activity started soon after last {{MediaSessionAction/voiceactivity}}
action.
</p>

<p class=note>
A page should only register a {{MediaSessionActionHandler}} for a <a>media
session action</a> when it can handle the action given that the user agent
Expand Down

0 comments on commit 7240fbe

Please sign in to comment.