heard icon indicating copy to clipboard operation
heard copied to clipboard

Persona voice IDs are ElevenLabs-only — Kokoro synth fails with 'Voice X not found'

Open arthursolwayne opened this issue 7 months ago • 1 comments

Repro

Fresh install, user opts into Kokoro at onboarding (skips the ElevenLabs key prompt). Persona is jarvis (the default for the British-butler voice).

$ /Applications/Heard.app/Contents/MacOS/python -m heard doctor
Daemon
  ✗ last error            synth_generic: Voice Fahco4VZzobUeiPqni1S not found in available voices
Synth
  · backend               Kokoro (no ElevenLabs key configured)
  ✗ synth                 AssertionError: Voice george not found in available voices

The doctor's own synth check uses cfg["voice"] (default literal "george"), and the daemon's narration path uses persona.voice (literal Fahco4VZzobUeiPqni1S for Jarvis). Neither value exists in Kokoro's voice list, so every speak path fails.

The 54 Kokoro voices follow <accent_gender>_<name> IDs (bm_george, af_nova, bm_lewis, …); there's no george or Fahco… in the set.

Affected files

  • heard/personas/aria.md → voice: rachel (ElevenLabs)
  • heard/personas/atlas.md → voice: sBObXMSU6qeIkKldMgv0 (ElevenLabs)
  • heard/personas/friday.md → voice: g6xIsTj2HwM6VR4iXFCw (ElevenLabs)
  • heard/personas/jarvis.md → voice: Fahco4VZzobUeiPqni1S (ElevenLabs)
  • heard/config.py:37 → "voice": "george" (ElevenLabs alias from tts/elevenlabs.py:42)

Resolution at speak time (daemon._voice) is just persona.voice or cfg["voice"] — no backend-aware fallback.

Suggested fix

A few options, ordered by minimum churn:

  1. Two-field persona frontmatter. Add kokoro_voice: bm_george etc. to each persona MD; daemon._voice picks the right field based on type(self.tts).__name__. Default config gets a kokoro_voice: bm_george too. Cheap, explicit, no magic.
  2. Backend-side validation + fallback. KokoroTTS.synth_to_file checks the requested voice against get_voices(), falls back to a backend default (e.g. bm_george) with a one-time warning. Hides the mismatch but doesn't fix the wrong-voice-on-narration UX (Jarvis would speak in a generic default).
  3. Explicit voice map per persona at backend switch. Maintain a {elevenlabs_id: kokoro_voice_id} map in each persona file or in tts/kokoro.py. Ugliest but lets onboarding pick a single persona and have it work everywhere.

I'd lean toward #1 — same shape as the existing frontmatter, no implicit mapping, and lets persona authors curate the Kokoro voice deliberately rather than getting whatever the heuristic spits out.

Manual workaround: edit ~/Library/Application Support/heard/config.yaml to add voice: bm_george AND edit the persona MD's frontmatter inside the .app to use a Kokoro voice. Without both, the synth fails.

Env

  • macOS 26
  • Heard v0.4

arthursolwayne avatar Apr 30 '26 22:04 arthursolwayne

Fixed in d4c8988. Added kokoro_voice frontmatter to all 4 bundled personas (jarvis: bm_george, aria: af_nova, atlas: bm_lewis, friday: af_bella) + matching resolver that picks the right field per backend. Went with your option #1 — explicit, no implicit mapping. doctor._step_synth now also picks the right voice based on whether an ElevenLabs key is configured.

ElevenLabs users see no change. Forks without kokoro_voice fall back to cfg["kokoro_voice"], never to an ElevenLabs ID. Will ship in v0.4.3.

sodiumsun avatar May 02 '26 06:05 sodiumsun