Skip to content

VoiceServer: Silent TTS failure returns HTTP 200 on invalid voice_id #701

@hjbrandt

Description

@hjbrandt

Bug Description

When a custom voice_id is passed to the VoiceServer /notify endpoint and the ElevenLabs API rejects it (e.g., invalid or inaccessible voice ID), the server catches the error silently and returns HTTP 200 with {"status": "success"}.

The caller has no indication that audio generation failed. No sound plays, but the response looks successful.

Steps to Reproduce

  1. Start the VoiceServer
  2. Send a notification with an invalid voice_id:
    curl -X POST http://localhost:8888/notify \
      -H "Content-Type: application/json" \
      -d '{"message": "Test", "voice_id": "invalid_voice_id_here"}'
  3. Observe: HTTP 200 returned, but no audio plays

Expected Behavior

The server should either:

  • Retry with the default voice and succeed, OR
  • Return an error HTTP response indicating TTS failed

Root Cause

In sendNotification(), the generateSpeech error is caught but not re-thrown. The function continues to the macOS notification display and the HTTP handler returns 200.

Proposed Fix

PR incoming with retry-with-default-voice fallback and proper error propagation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions