Skip to content

feat(profiles): add voice selection for live calls - #364

Open
swaroopch wants to merge 1 commit into
boldsoftware:mainfrom
swaroopch:feat/profile-voice-selection
Open

swaroopch wants to merge 1 commit into
boldsoftware:mainfrom
swaroopch:feat/profile-voice-selection

Conversation

@swaroopch

Copy link
Copy Markdown
Contributor

Summary

Add per-profile speaker voice selection for GPT-Live voice calls (POST /api/conversation/{id}/live-session), following OpenAI's documented voice options: https://developers.openai.com/api/docs/guides/live-conversations#voice-options

  • Profile storage & API (server/profiles.go): Adds a voice field on profiles (stored in the profile JSON alongside voice_prompt, not copied into conversation settings, and preserved when omitted in PUT /api/profiles/{name}). Validates non-empty values against the 38 built-in GPT-Live voices; "" continues using OpenAI's default (marin).
  • Live session startup (server/live_session.go): Sends session.audio.output.voice when the active profile has a non-empty voice, and omits audio when unset so the default (marin) is unchanged.
  • Profile editor UI (ui/src/vue/components/ProfilesModal.vue, ui/src/types.ts, ui/src/services/api.ts, ui/src/styles.css): Adds a Voice → Speaker dropdown (marin (default) pre-selected when unset, plus all other 37 voices) and displays voice <name> in the profile list summary when customized.
  • Tests (server/profiles_test.go, server/live_session_test.go): Covers profile voice validation, persistence, built-in edit/restore, and forwarding session.audio.output.voice for conversations and drafts.

Implementation prompt

If you prefer to implement the intent independently rather than use this code diff, use this prompt:

Add per-profile speaker voice selection for GPT-Live voice calls while keeping
the default voice (`marin`) unchanged when no voice is configured.

Reference:
https://developers.openai.com/api/docs/guides/live-conversations#voice-options

Requirements:
1. Store an optional `voice` string on profiles alongside `voice_prompt` (in the
   existing profile JSON storage, without altering DB schemas or copying it into
   conversation settings). Read it at call startup just like `voice_prompt`.
2. In `POST /api/profiles` and `PUT /api/profiles/{name}`, trim and validate
   `voice` against the 38 documented GPT-Live built-in voices (allowing `""` for
   the default). On `PUT`, omitting `voice` must preserve the existing value so
   settings-only updates (e.g., from the model picker) do not clear it, and
   no-op saves on built-in profiles must not mark them `user_edited`.
3. In live-session creation, include `session.audio.output.voice` in the request
   to the Live provider when the resolved profile has a non-empty `voice`, and
   omit `audio` when it is empty.
4. In the profile editor UI, add a Voice selector listing all 38 voices with
   `marin (default)` pre-selected when unset (saving `""` when `marin` is
   selected so default behavior and built-in profiles stay clean). Show custom
   voices in profile summaries.
5. Add backend unit tests for profile voice validation, persistence, omission on
   `PUT`, built-in restore, and `session.audio.output.voice` forwarding for both
   active conversations and drafts.

Store an optional output voice per profile (alongside voice_prompt) and
forward it as session.audio.output.voice when starting a GPT-Live
WebRTC session.

Voice options follow the documented GPT-Live voice list (defaulting to
marin when unset):
https://developers.openai.com/api/docs/guides/live-conversations#voice-options

Co-authored-by: Shelley <shelley@exe.dev>
@cla-bot cla-bot Bot added the cla-signed label Nov 25, 2026

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant