Skip to content

Voice plays despite settings.json voice.enabled: false #83

@virtualian

Description

@virtualian

Summary

settings.json has notifications.voice.enabled: false, but voice announcements still play on every prompt submit and after every response completes. The settings toggle is disconnected from both actual voice producers.

Two Independent Voice Sources (Neither Checks Settings)

Source 1: VoiceCompletion.hook.ts (Stop event)

  • Trigger: After every response — extracts 🗣️ Viki: line, sends to localhost:8888/notify
  • Gate: Only checks isMainSession() (skips subagents) — never reads notifications.voice.enabled
  • Config location: settings.json Stop hooks array, line ~237
  • File: hooks/VoiceCompletion.hook.tshooks/handlers/VoiceNotification.ts

Source 2: Inline curl commands in CLAUDE.md / Algorithm

  • Trigger: On prompt submit — DA executes hardcoded curl to localhost:8888/notify
  • Gate: None — it's a prompt instruction, always followed
  • Locations:
    • CLAUDE.md line 21: "Executing using PAI native mode"
    • PAI/Algorithm/v3.7.0.md line 136: "Entering the Algorithm"
    • Various agent files (Engineer.md, ClaudeResearcher.md, PerplexityResearcher.md, etc.)

What notifications.voice.enabled Actually Controls

Nothing that produces voice. The flag at settings.json line 371 exists but neither voice source reads it.

Proposed Fix

Option A: Wire up the settings check (recommended)

  1. VoiceCompletion hook: Read notifications.voice.enabled from settings.json early in the handler; exit if false
  2. CLAUDE.md / Algorithm: Wrap voice commands in a conditional: "Only execute the voice curl if notifications.voice.enabled is true in settings.json" — or better, have a shared gate function the DA calls

Option B: Quick disable

  1. Remove VoiceCompletion.hook.ts from the Stop hooks array in settings.json
  2. Remove/comment the curl commands from CLAUDE.md and Algorithm files
  3. Downside: re-enabling requires manual reversal in multiple files

Option C: Voice server gate

Have the localhost:8888 voice server itself check the settings flag before playing audio. Single point of control, but adds a dependency.

Files

  • hooks/VoiceCompletion.hook.ts
  • hooks/handlers/VoiceNotification.ts
  • CLAUDE.md (line 21)
  • PAI/Algorithm/v3.7.0.md (lines 38, 136)
  • PAI/Algorithm/v3.5.0.md (lines 26, 116)
  • Agent files: agents/Engineer.md, agents/ClaudeResearcher.md, agents/PerplexityResearcher.md
  • settings.json (notifications.voice.enabled at line ~371)

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