Skip to content

feat(voice): report the selected voice in voice telemetry - #460

Open
johnmatthewtennant wants to merge 2 commits into
mainfrom
jtennant/voice-telemetry-voice
Open

johnmatthewtennant wants to merge 2 commits into
mainfrom
jtennant/voice-telemetry-voice

Conversation

@johnmatthewtennant

@johnmatthewtennant johnmatthewtennant commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Berd Voice telemetry now records which output voice is selected. Both berd_voice_conversation_started and berd_voice_conversation_ended carry an optional tts_voice: the voice id from the output backend's own catalog (a Pocket voice id, a Siri voice name, or an OpenAI voice), custom when the selected voice is outside that catalog (for example a BERD_OPENAI_TTS_VOICE override), and omitted when no voice is selected or the setting cannot be read. Like tts_rate, it is a snapshot taken at the start and repeated on the end event.

The new attribute ships under schema berd-otlp-logs-v4. The gateway rejects unknown attributes, so https://github.com/squareup/berd-monitoring/pull/40 must be deployed before this client is released.

Reviewer-reproducible examples

In an isolated native macOS dev app launched with VITE_ENVIRONMENT=staging VITE_TELEMETRY=1 VITE_OTLP_LOGS_ENDPOINT=https://otlp.invalid.goose-internal.example/v1/logs, enable usage-data consent, choose Siri output with the Samantha voice, start a voice conversation and hang up. The native development log should show "tts_voice":"Samantha" on both the start and end events. With Pocket output and a catalog voice such as vera, both events carry "tts_voice":"vera". With OpenAI output and BERD_OPENAI_TTS_VOICE=my-gateway-voice, both carry "tts_voice":"custom".

Automated coverage on this head, run on macOS (Blox):

pnpm typecheck                                                        pass
pnpm exec vitest run src/features/voice-conversation src/shared/telemetry   38 files, 550 tests pass
just tauri-fmt-check                                                   pass
just _tauri-cargo-unix test --lib commands::voice_capture             10 passed
just _tauri-cargo-unix test --lib telemetry                           46 passed

The tests cover per-backend catalog lookup, the custom bucket, omission when no voice is selected or the status call fails, plumbing through native start and end accounting, and the v4 schema header.

The native app scenario above has not been completed. On a Blox macOS workstation the dev app reaches a Goose chat and the dev telemetry tap logs other events, but starting a voice conversation hangs in CoreAudio while opening the output device (the EC2 Mac has no audio hardware), so the voice events never fire there.

🤖 Generated with Claude Code

johnmatthewtennant and others added 2 commits October 30, 2026 10:51
Voice conversation start and end records now carry tts_voice: the
selected output voice from the backend's own catalog (Pocket voice id,
Siri voice name, or OpenAI voice), "custom" for a voice outside that
catalog such as an environment override, and omitted when none is
selected. The wire contract moves to berd-otlp-logs-v4, which the
gateway must accept before this client is released.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: John Matthew Tennant <jtennant@block.xyz>
Co-authored-by: Henry <a0d9f90f86da5f023099d22b8e3599af162d9423a422d8f385a12815de879cf2@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: John Matthew Tennant <jtennant@block.xyz>
Co-authored-by: Henry <a0d9f90f86da5f023099d22b8e3599af162d9423a422d8f385a12815de879cf2@buzz.block.builderlab.xyz>
@johnmatthewtennant
johnmatthewtennant marked this pull request as ready for review October 30, 2026 15:18
@johnmatthewtennant
johnmatthewtennant requested a review from a team October 30, 2026 15:18

@morgmart morgmart left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated code review

APPROVE. A fresh static review of the exact prepared three-dot range found no publishable findings. The selected output voice is derived from each backend's effective status, free-form OpenAI overrides are bucketed as custom, unavailable settings are omitted, and the start snapshot is preserved through native lifecycle accounting into the end event. The v4 wire-contract header and event serialization are covered by discriminating tests. Supplied GitHub evidence was inspected and structurally valid; all 11 listed checks succeeded on this exact SHA. Final self-check covered every changed voice-telemetry flow across Pocket, Siri, and OpenAI; consent and telemetry export guards; accessibility and localization completeness; navigation; async status failures and never-completes behavior; lifecycle ownership, renderer replacement, end-event idempotence, and race behavior; test honesty; project rules; duplicate and overlapping findings; and concrete evidence plus user effect for blocking severity. No review threads or duplicates were supplied. The gateway schema deployment dependency noted by the author remains a release-ordering requirement, and required checks still govern merge readiness.

Deterministic publication result: 0 blocking and 0 non-blocking inline finding(s) publishable; 0 duplicate(s) suppressed; 0 blocking screenshot-evidence requirement(s) in this review body.

Pending checks: 1 check(s) are not complete.

This approval reflects the completed code review only; merge readiness remains governed by the repository's required checks.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants