Skip to content

Add machine-local character voice profiles using Kokoro and Piper #5380

Description

@atomantic

Part of #5377. Blocked by #5378.

Goal

Add machine-local, approved character voice profiles that initially wrap the existing Kokoro and Piper voices and provide a stable resolver for offline dialogue and hosted-mode prototypes.

Proposed approach

  • Add DB-primary voice_profiles metadata with managed files under data/voice-profiles/<profileId>/, documented in docs/STORAGE.md and included in backup.
  • Bind profiles locally by (universeId, characterId) and route (studio or interactive) without persisting profile ids into federated Universe records.
  • Extend the TTS facade with capability discovery and profile-aware synthesis while keeping preset synthesis backward compatible.
  • Add benchmark lines, preview comparison, explicit promotion, revisions, and approval state.
  • Add a reproducible mastering chain and capability-probed rate, modest pitch, and formant controls; disable unsupported controls with setup guidance.
  • Resolve approved profile -> existing namespaced voiceId -> project/system fallback, reporting degraded bindings.

Acceptance criteria

  • Existing Kokoro/Piper synthesis continues to work without profile migration.
  • A character can promote an existing preset as an approved profile and render the fixed benchmark script.
  • Offline dialogue provenance records profile revision, engine/model revision, effective delivery controls, timings, and mastering.
  • Changing the project default voice does not change a character with an approved profile.
  • Source assets and artifacts remain machine-local, use safe basenames, and are backed up.
  • Missing, unavailable, and intentionally empty states remain distinct throughout resolver and UI behavior.

Out of scope

  • New voice-model downloads, cloning, or training.
  • Automatic approval based on similarity metrics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:databasePostgreSQL/storage/data-migrationarea:mediaarea:voiceVoice stack: STT/TTS pipeline, proactive speech, voice tools, call bridgeeffort:xhighDispatch reasoning effort: extra highmodel:mediumModel size: mediumplanTracked by /do:replanplan-featureFeature plan filed by the plan-feature brainstorm

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions