From 7240fbeda25af65e613137db12d9935f4c1c110d Mon Sep 17 00:00:00 2001 From: Jianjun Zhu Date: Tue, 2 Jul 2024 13:59:52 +0800 Subject: [PATCH] Add a note for voice activity explanation. --- index.bs | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/index.bs b/index.bs index bedd997..d75727c 100644 --- a/index.bs +++ b/index.bs @@ -414,8 +414,8 @@ platform UI or media keys, thereby improving the user experience.
  • voiceactivity: - 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.
  • @@ -547,10 +547,10 @@ platform UI or media keys, thereby improving the user experience. steps defined to [$set a track's muted state$].

    - 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 @@ -558,6 +558,19 @@ platform UI or media keys, thereby improving the user experience. policies.

    +

    + {{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. +

    +

    A page should only register a {{MediaSessionActionHandler}} for a media session action when it can handle the action given that the user agent