Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

Bug: pai-voice-system voice-personalities.json path mismatch

Open virtualian opened this issue 10 months ago • 1 comments

Summary

The voice server fails to load voice personality configurations because INSTALL.md places the file in a different location than where server.ts looks for it.

Related Issues

  • #346 - ENV path inconsistent (same pattern of path mismatches)
  • #359 - v1.0.1 doc fixes addressed file naming but NOT this path issue

Expected Behavior

Voice server loads voice-personalities.json and resolves agent names (e.g., "marrvin") to actual ElevenLabs voice IDs.

Actual Behavior

Config not loaded, server sends agent name directly to ElevenLabs API:

ElevenLabs API error: 404 - {"detail":{"status":"voice_not_found","message":"A voice with the voice_id marrvin was not found."}}

Root Cause

INSTALL.md specifies:

cp "$PACK_DIR/config/voice-personalities.json" "$PAI_DIR/VoiceServer/"

Result: ~/.claude/VoiceServer/voice-personalities.json

server.ts looks in (lines 108-125):

  1. Primary: $PAI_DIR/skills/CORE/voice-personalities.md (markdown with embedded JSON) - doesn't exist
  2. Fallback: join(import.meta.dir, '..', '..', 'voice-personalities.json') - wrong path

The fallback path resolves incorrectly:

  • From installed location ~/.claude/VoiceServer/server.ts, ../.. goes to ~/.claude/ not ~/.claude/VoiceServer/
  • In pack structure src/voice/server.ts, ../.. goes to pack root, but file is in config/

Proposed Fix

Option A (Recommended): Update INSTALL.md to create config at primary lookup location:

# Create voice-personalities.md in CORE (where server looks first)
# Wrap JSON in markdown code block

Option B: Fix server.ts fallback path:

// Current (broken):
const voicesPath = join(import.meta.dir, '..', '..', 'voice-personalities.json');

// Fixed:
const voicesPath = join(PAI_DIR, 'VoiceServer', 'voice-personalities.json');

Affected Files

  • Packs/pai-voice-system/INSTALL.md - installation procedure
  • Packs/pai-voice-system/src/voice/server.ts - line 120, fallback path

Workaround

Manually create $PAI_DIR/skills/CORE/voice-personalities.md with JSON config embedded in markdown code block.

virtualian avatar Jan 12 '26 21:01 virtualian

Thanks for catching this! The voice personality path handling was fixed in the v3.0 voice system restructure (now released). Please upgrade to v3.0.

kaimagnus avatar Feb 15 '26 17:02 kaimagnus