Skip to content

Voice: opt out of backend auto-narration (auto_narrate: false) - #325799

Merged
Megan Rogge (meganrogge) merged 1 commit into
microsoft:megrogge/voice-backend-narrate-apifrom
accnops:arthurcnops/voice-narrate-optout
Jul 14, 2026
Merged

Megan Rogge (meganrogge) merged 1 commit into
microsoft:megrogge/voice-backend-narrate-apifrom
accnops:arthurcnops/voice-narrate-optout

Conversation

@accnops

Copy link
Copy Markdown
Contributor

Problem

The backend now supports client-driven narration: an explicit request_narration event plus an auto_narrate opt-out (see infinity-microsoft/yolo#54602). PR #325682 adds the requestNarration client API, but the client still lets the backend auto-narrate every reply, so assistant responses are spoken twice (once by backend auto-narration, once by the explicit request).

Solution

Send auto_narrate: false in the start_session and resume_session payloads so the backend stops auto-narrating and the client drives narration itself via requestNarration.

The param is additive and optional: an older backend that doesn't read auto_narrate is unaffected, so this is not a breaking change.

Tests

None added — this is a two-line change to the outbound session payloads in voiceClientService.ts; there is no existing unit harness for these payloads. Verified manually against a local voice_code backend.

Risks

  • Requires a backend that honors auto_narrate (infinity-microsoft/yolo#54602). Against an older backend the flag is ignored and behavior is unchanged.

Non-goals

Stacked on megrogge/voice-backend-narrate-api (#325682); base this PR there so the diff is just the opt-out.

This client drives narration itself via `requestNarration`, but the voice
backend still auto-narrates session-context state transitions by default
(the opt-out is per-session and defaults on for backward compatibility).
Without opting out, replies would be narrated twice.

Send `auto_narrate: false` on start_session and resume_session so the
backend suppresses its inferred auto-narration and speaks only on explicit
`request_narration`. The flag is sticky per session on the backend, so it
does not need to be repeated on every session_context delta.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 803dc35b-1aee-4354-85c7-df6076293a49
@meganrogge
Megan Rogge (meganrogge) marked this pull request as ready for review July 14, 2026 15:51
@meganrogge
Megan Rogge (meganrogge) merged commit 2968642 into microsoft:megrogge/voice-backend-narrate-api Jul 14, 2026
7 of 9 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.130.0 milestone Jul 14, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Aug 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants