Skip to content

TTS fails with uncaught errors for unauthenticated users #268

@rosscado

Description

@rosscado

Problem

When an unauthenticated user uses SayPi, the extension attempts to synthesize speech (TTS) which fails because TTS is a premium feature. This results in repeated uncaught promise rejections in the console:

Uncaught (in promise) Error: Failed to synthesize speech
    at TextToSpeechService.createSpeech
    at async AudioStreamManager.createStream
    at async SpeechSynthesisModule.createSpeechStream
    ...

Expected Behavior

  1. Voice selector should be disabled/greyed out when user is unauthenticated (to indicate TTS is unavailable)
  2. Don't attempt TTS synthesis when it will predictably fail
  3. Handle errors gracefully - no uncaught promise rejections in console

Current Behavior

  • Voice selector is enabled and selectable even when unauthenticated
  • Extension attempts TTS on every assistant message, failing each time
  • Errors are unhandled, cluttering the console

Suggested Fix

  • Check auth status before attempting TTS
  • Disable voice UI elements when TTS is unavailable
  • Wrap TTS calls in proper try/catch with graceful degradation

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions