agentvibes 5.6.7 → 5.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/.agentvibes/LITE-MODE.md +236 -0
  2. package/.agentvibes/README.md +136 -0
  3. package/.agentvibes/backup/session-start-tts.sh.20251210_212814 +141 -0
  4. package/.agentvibes/backups/agents/analyst_20260204_144958.md +78 -0
  5. package/.agentvibes/backups/agents/architect_20260204_144958.md +72 -0
  6. package/.agentvibes/backups/agents/dev_20260204_144958.md +74 -0
  7. package/.agentvibes/backups/agents/pm_20260204_144958.md +72 -0
  8. package/.agentvibes/backups/agents/quick-flow-solo-dev_20260204_144958.md +64 -0
  9. package/.agentvibes/backups/agents/sm_20260204_144958.md +87 -0
  10. package/.agentvibes/backups/agents/tea_20260204_144958.md +79 -0
  11. package/.agentvibes/backups/agents/tech-writer_20260204_144958.md +82 -0
  12. package/.agentvibes/backups/agents/ux-designer_20260204_144958.md +80 -0
  13. package/.agentvibes/config/README-personality-defaults.md +162 -0
  14. package/.agentvibes/config/agentvibes.json +1 -0
  15. package/.agentvibes/config/mode.txt +1 -0
  16. package/.agentvibes/config/personality-voice-defaults.default.json +21 -0
  17. package/.agentvibes/config/save-audio.txt +1 -0
  18. package/.agentvibes/config/voice-metadata.json +160 -0
  19. package/.agentvibes/config.json +38 -1
  20. package/.agentvibes/hooks/help.sh +191 -0
  21. package/.agentvibes/hooks/post-tool-use-lite.sh +111 -0
  22. package/.agentvibes/hooks/save-audio-manager.sh +162 -0
  23. package/.agentvibes/hooks/session-start-full-optimized.sh +102 -0
  24. package/.agentvibes/hooks/session-start-full.sh +142 -0
  25. package/.agentvibes/hooks/session-start-lite-v2.sh +34 -0
  26. package/.agentvibes/hooks/session-start-lite.sh +29 -0
  27. package/.agentvibes/hooks/stop-lite.sh +115 -0
  28. package/.agentvibes/hooks/switch-mode.sh +215 -0
  29. package/.agentvibes/output-styles/audio-summary.md +30 -0
  30. package/.claude/audio/voice-samples/piper/alan.wav +0 -0
  31. package/.claude/audio/voice-samples/piper/amy.wav +0 -0
  32. package/.claude/audio/voice-samples/piper/charlotte.wav +0 -0
  33. package/.claude/audio/voice-samples/piper/joe.wav +0 -0
  34. package/.claude/audio/voice-samples/piper/john.wav +0 -0
  35. package/.claude/audio/voice-samples/piper/katherine.wav +0 -0
  36. package/.claude/audio/voice-samples/piper/kristin.wav +0 -0
  37. package/.claude/audio/voice-samples/piper/linda.wav +0 -0
  38. package/.claude/audio/voice-samples/piper/marcus.wav +0 -0
  39. package/.claude/audio/voice-samples/piper/ryan.wav +0 -0
  40. package/.claude/commands/agent-vibes/provider.md +0 -0
  41. package/.claude/commands/agent-vibes-bmad-voices.md +117 -117
  42. package/.claude/commands/agent-vibes-rdp.md +24 -24
  43. package/.claude/config/audio-effects.cfg +6 -1
  44. package/.claude/config/background-music-position.txt +8 -6
  45. package/.claude/config/reverb-level.txt +0 -0
  46. package/.claude/docs/TERMUX_SETUP.md +408 -408
  47. package/.claude/github-star-reminder.txt +1 -1
  48. package/.claude/hooks/audio-cache-utils.sh +0 -0
  49. package/.claude/hooks/audio-processor.sh +0 -0
  50. package/.claude/hooks/background-music-manager.sh +0 -0
  51. package/.claude/hooks/bmad-party-manager.sh +225 -0
  52. package/.claude/hooks/bmad-party-speak.sh +0 -0
  53. package/.claude/hooks/bmad-speak-enhanced.sh +0 -0
  54. package/.claude/hooks/bmad-speak.sh +0 -0
  55. package/.claude/hooks/bmad-tts-injector.sh +0 -0
  56. package/.claude/hooks/bmad-voice-manager.sh +0 -0
  57. package/.claude/hooks/clawdbot-receiver-SECURE.sh +0 -0
  58. package/.claude/hooks/clawdbot-receiver.sh +0 -0
  59. package/.claude/hooks/clean-audio-cache.sh +0 -0
  60. package/.claude/hooks/cleanup-cache.sh +0 -0
  61. package/.claude/hooks/configure-rdp-mode.sh +0 -0
  62. package/.claude/hooks/download-extra-voices.sh +0 -0
  63. package/.claude/hooks/effects-manager.sh +0 -0
  64. package/.claude/hooks/github-star-reminder.sh +0 -0
  65. package/.claude/hooks/language-manager.sh +0 -0
  66. package/.claude/hooks/learn-manager.sh +0 -0
  67. package/.claude/hooks/macos-voice-manager.sh +0 -0
  68. package/.claude/hooks/migrate-background-music.sh +0 -0
  69. package/.claude/hooks/migrate-to-agentvibes.sh +0 -0
  70. package/.claude/hooks/optimize-background-music.sh +0 -0
  71. package/.claude/hooks/path-resolver.sh +0 -0
  72. package/.claude/hooks/personality-manager.sh +0 -0
  73. package/.claude/hooks/piper-download-voices.sh +0 -0
  74. package/.claude/hooks/piper-installer.sh +0 -0
  75. package/.claude/hooks/piper-multispeaker-registry.sh +0 -0
  76. package/.claude/hooks/piper-voice-manager.sh +0 -0
  77. package/.claude/hooks/play-tts-agentvibes-receiver-for-voiceless-connections.sh +0 -0
  78. package/.claude/hooks/play-tts-enhanced.sh +0 -0
  79. package/.claude/hooks/play-tts-macos.sh +0 -0
  80. package/.claude/hooks/play-tts-piper.sh +40 -2
  81. package/.claude/hooks/play-tts-soprano.sh +0 -0
  82. package/.claude/hooks/play-tts-ssh-remote.sh +0 -0
  83. package/.claude/hooks/play-tts-termux-ssh.sh +0 -0
  84. package/.claude/hooks/play-tts-windows-receiver.sh +0 -0
  85. package/.claude/hooks/play-tts.sh +13 -0
  86. package/.claude/hooks/post-response.sh +41 -0
  87. package/.claude/hooks/prepare-release.sh +0 -0
  88. package/.claude/hooks/provider-commands.sh +0 -0
  89. package/.claude/hooks/provider-manager.sh +0 -0
  90. package/.claude/hooks/replay-target-audio.sh +0 -0
  91. package/.claude/hooks/sentiment-manager.sh +0 -0
  92. package/.claude/hooks/session-start-tts.sh +48 -13
  93. package/.claude/hooks/soprano-gradio-synth.py +0 -0
  94. package/.claude/hooks/speed-manager.sh +0 -0
  95. package/.claude/hooks/stop-tts.sh +0 -0
  96. package/.claude/hooks/stop.sh +63 -0
  97. package/.claude/hooks/termux-installer.sh +0 -0
  98. package/.claude/hooks/translate-manager.sh +0 -0
  99. package/.claude/hooks/translator.py +0 -0
  100. package/.claude/hooks/tts-queue-worker.sh +0 -0
  101. package/.claude/hooks/tts-queue.sh +0 -0
  102. package/.claude/hooks/verbosity-manager.sh +0 -0
  103. package/.claude/hooks/voice-manager.sh +0 -0
  104. package/.claude/hooks-windows/audio-cache-utils.ps1 +119 -119
  105. package/.claude/hooks-windows/play-tts-piper.ps1 +26 -1
  106. package/.claude/hooks-windows/play-tts.ps1 +25 -1
  107. package/.claude/hooks-windows/session-start-tts.ps1 +28 -9
  108. package/.claude/piper-voices-dir.txt +1 -0
  109. package/.claude/settings.json +2 -2
  110. package/.clawdbot/README.md +105 -105
  111. package/.mcp.json +32 -3
  112. package/CLAUDE.md +9 -0
  113. package/README.md +21 -3
  114. package/RELEASE_NOTES.md +61 -0
  115. package/WINDOWS-SETUP.md +208 -208
  116. package/bin/agent-vibes +0 -0
  117. package/bin/agentvibes-voice-browser.js +59 -4
  118. package/bin/agentvibes.js +0 -0
  119. package/bin/ensure-soprano-running.sh +43 -0
  120. package/bin/mcp-server.js +121 -121
  121. package/bin/mcp-server.sh +0 -0
  122. package/bin/test-bmad-pr +78 -78
  123. package/mcp-server/QUICK_START.md +203 -203
  124. package/mcp-server/README.md +345 -345
  125. package/mcp-server/WINDOWS_SETUP.md +260 -260
  126. package/mcp-server/docs/troubleshooting-audio.md +313 -313
  127. package/mcp-server/examples/claude_desktop_config.json +11 -11
  128. package/mcp-server/examples/claude_desktop_config_piper.json +9 -9
  129. package/mcp-server/examples/custom_instructions.md +169 -169
  130. package/mcp-server/install-deps.js +177 -130
  131. package/mcp-server/server.py +1797 -1787
  132. package/mcp-server/test_server.py +0 -0
  133. package/package.json +1 -1
  134. package/src/console/app.js +6 -0
  135. package/src/console/tabs/music-tab.js +18 -2
  136. package/src/console/widgets/format-utils.js +11 -2
  137. package/src/installer.js +38 -37
  138. package/src/services/llm-provider-service.js +28 -9
  139. package/src/utils/voice-names.js +2 -0
  140. package/templates/agentvibes-receiver.sh +0 -0
  141. package/templates/audio/welcome-music.mp3 +0 -0
  142. package/.claude/hooks/play-tts-agentvibes-receiver.sh +0 -1
package/CLAUDE.md CHANGED
@@ -28,6 +28,15 @@ This project follows **BMAD (BMM - Business Model Methodology)** for all story d
28
28
  4. **Update sprint-status.yaml** automatically via `/dev-story`
29
29
  5. **Code review included** - Built into `/dev-story` workflow
30
30
 
31
+ ### ✅ Non-Destructive Configuration Rule (MANDATORY)
32
+ All code that reads, writes, or modifies user configuration MUST be non-destructive:
33
+ 1. **Never delete or overwrite** existing user `.claude/` or `~/.claude/` config files (settings, voices, personalities, audio-effects.cfg) unless the user explicitly requested it
34
+ 2. **Copy new files; never remove existing ones** — installer adds missing files only
35
+ 3. **Write hooks only when absent** — `configureSessionStartHook` and similar functions check for existing hooks before writing
36
+ 4. **Preserve custom entries** — e.g. `audio-effects.cfg` user rows must survive an `agentvibes update`
37
+ 5. **Creating directories is fine** — `mkdir -p` / `{ recursive: true }` is always safe
38
+ 6. Any function that could overwrite user data must have a test asserting idempotency
39
+
31
40
  ### ✅ Git Workflow (ONLY Outside BMAD)
32
41
  For changes outside story development:
33
42
  1. Describe changes before acting
package/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
  [![Publish](https://github.com/paulpreibisch/AgentVibes/actions/workflows/publish.yml/badge.svg)](https://github.com/paulpreibisch/AgentVibes/actions/workflows/publish.yml)
12
12
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
13
13
 
14
- **Author**: Paul Preibisch ([@997Fire](https://x.com/997Fire)) | **Version**: v5.6.7
14
+ **Author**: Paul Preibisch ([@997Fire](https://x.com/997Fire)) | **Version**: v5.6.9
15
15
 
16
16
  ---
17
17
 
@@ -40,9 +40,27 @@ Whether you're coding in Claude Code, chatting in Claude Desktop, using Warp Ter
40
40
 
41
41
  ---
42
42
 
43
- ## 🌟 NEW IN v5.6.7Windows Preview Fixed
43
+ ## 🌟 NEW IN v5.6.9Reverb & Background Music Silent in NPX Installs
44
44
 
45
- The **Preview button in LLM audio configuration now works correctly on Windows**. It plays the voice, reverb, and background track you configured no more defaulting to the wrong voice or playing silence.
45
+ **NPX users:** Reverb and background music were silently broken for all `npx`-installed users. Hook files extracted from the npm tarball lacked execute bits (644), causing `audio-processor.sh` to exit with code 126. Fixed via `bash` prefix in the caller and a postinstall `chmod 755` step.
46
+
47
+ **Voice Browser:** The Preview button now applies your configured reverb and background music — it was playing raw audio with no effects.
48
+
49
+ **MCP tool:** `text_to_speech` now returns the correct audio file path (no trailing emoji garbage) and includes the voice name in its response.
50
+
51
+ **Background music toggle:** Enabling music in the TUI now actually enables it — the flag file read by bash hooks is now kept in sync.
52
+
53
+ ## v5.6.8 — WSL Voice Routing Fixed + Session Lifecycle Reliability
54
+
55
+ **WSL users:** AgentVibes was playing `en_US-lessac-medium` regardless of your configured voice. Fixed — Piper is now found in non-interactive shells by explicitly prepending `~/.local/bin` to `PATH` before the binary check.
56
+
57
+ **Per-project routing:** The session-start hook now bakes `--project-dir` into every injected TTS command, so your configured voice and music play correctly in Bash tool calls even when `CLAUDE_PROJECT_DIR` isn't in the environment.
58
+
59
+ `play-tts-piper.sh` and `play-tts-piper.ps1` are now included in `agentvibes install`'s critical hooks deployment — updated versions propagate automatically.
60
+
61
+ ## v5.6.7 — Windows Preview Fixed
62
+
63
+ The Preview button in LLM audio configuration now works correctly on Windows.
46
64
 
47
65
  ## v5.6.6 — Preview Button Works in WSL + Comprehensive Windows Test Suite
48
66
 
package/RELEASE_NOTES.md CHANGED
@@ -1,5 +1,66 @@
1
1
  # AgentVibes Release Notes
2
2
 
3
+ ## 🔇 v5.6.9 — Reverb & Background Music Silent in NPX Installs
4
+
5
+ **Released:** 2026-05-09
6
+
7
+ ### 🐛 Reverb and Background Music Silently Broken for All NPX Users
8
+
9
+ When AgentVibes is installed via `npx`, hook files are extracted from the tarball with 644 permissions — no execute bit. `play-tts-piper.sh` called `audio-processor.sh` directly, which exits immediately with code 126 (Permission denied) on a non-executable file. Every `npx`-installed user was getting voice-only TTS — no reverb, no background music, silently.
10
+
11
+ **Fix 1:** `play-tts-piper.sh` now calls `audio-processor.sh` via `bash "$SCRIPT_DIR/audio-processor.sh"`, bypassing the execute-bit check.
12
+ **Fix 2:** `install-deps.js` (postinstall) now runs `ensureHookPermissions()` to `chmod 755` all `.sh` files after npm install.
13
+
14
+ ### 🐛 Voice Browser Preview Ignored Reverb and Background Music
15
+
16
+ The **Preview** button in the Voice Browser played raw piper output with no reverb and no background music, bypassing `audio-processor.sh` entirely.
17
+
18
+ **Fix:** Preview audio now routes through the same `audio-processor.sh` pipeline as real TTS.
19
+
20
+ ### 🐛 MCP `text_to_speech` Returned Garbled File Path and Missing Voice Info
21
+
22
+ The tool extracted the audio file path incorrectly (trailing size/emoji characters included) and never reported the voice name in its response.
23
+
24
+ **Fix:** ANSI codes are stripped before parsing, the `.wav` path is cleanly extracted, and the `🎤 Voice used:` line is included in the tool response.
25
+
26
+ ### 🐛 Background Music TUI Toggle Didn't Take Effect
27
+
28
+ Enabling background music in the **Music** tab wrote to `config.json` but not to `background-music-enabled.txt` (read by bash hooks). Music stayed off after toggling. Saving a track also now implies enabling music.
29
+
30
+ ---
31
+
32
+ ## 🐧 v5.6.8 — WSL Voice Routing Fixed + Session Lifecycle Reliability
33
+
34
+ **Released:** 2026-05-09
35
+
36
+ ### 🐛 WSL: Configured Voice Now Plays (Not Lessac Fallback)
37
+
38
+ In WSL sessions, AgentVibes was playing `en_US-lessac-medium` regardless of what voice you configured. The root cause: `pipx` installs Piper to `~/.local/bin/`, which interactive shells get via `.bashrc`/`.zshrc`, but Claude Code's Bash tool calls run non-interactively and skip profile sourcing — `command -v piper` failed, falling back to the default voice.
39
+
40
+ **Fix:** `play-tts-piper.sh` now prepends `~/.local/bin` and the pipx Piper venv bin to `PATH` before the binary check, so Piper is found regardless of shell mode.
41
+
42
+ ### 🐛 Per-Project Voice/Music Lost When `CLAUDE_PROJECT_DIR` Not in Bash Environment
43
+
44
+ When Claude Code runs a Bash tool call, `CLAUDE_PROJECT_DIR` is not passed in the environment. The TTS hooks couldn't find per-project config and fell back to global defaults — wrong voice, wrong music, no pretext.
45
+
46
+ **Fix:** `session-start-tts.sh` (and `.ps1`) now bakes the project directory into the injected hook command as `--project-dir`. `play-tts.sh` reads this flag before any config lookup, so per-project routing is reliable in every Bash tool call.
47
+
48
+ ### 🐛 `play-tts-piper.sh` and `play-tts-piper.ps1` Not Deployed by `agentvibes install`
49
+
50
+ These hooks were missing from `CRITICAL_HOOKS` / `CRITICAL_HOOKS_WINDOWS`, so `agentvibes install` never propagated updated versions to `~/.claude/hooks/`.
51
+
52
+ **Fix:** Both are now in the critical hooks list and always deployed on install/update.
53
+
54
+ ### 🐛 Voice Display Name Bugs
55
+
56
+ - `uniquifyVoiceName("Mary-1")` returned `"Mary-1 Bell"` instead of `"Mary Bell"`.
57
+ - 16Speakers names like `Rose_Ibex` were incorrectly getting a surname appended (`"Rose Ibex Bell"`).
58
+ - `🎤 Voice used:` line was missing from WSL bash output.
59
+
60
+ All three fixed. A new test file (`test/unit/voice-names.test.js`, 16 tests) covers these cases.
61
+
62
+ ---
63
+
3
64
  ## 🪟 v5.6.7 — Windows Preview Fixed
4
65
 
5
66
  **Released:** 2026-05-08
package/WINDOWS-SETUP.md CHANGED
@@ -1,208 +1,208 @@
1
- # AgentVibes Windows Native Setup
2
-
3
- This folder contains AgentVibes configured for **native Windows** (not WSL) with three TTS providers available.
4
-
5
- ## Quick Start
6
-
7
- ### 1. Open in VS Code (Native Windows)
8
-
9
- - **File > Open Folder** > Select this folder (`agentvibes-in-windows`)
10
- - Make sure you're opening in **native Windows VS Code** (not WSL remote)
11
-
12
- ### 2. Open PowerShell Terminal
13
-
14
- - **Terminal > New Terminal**
15
- - Change shell to **PowerShell** (if needed)
16
-
17
- ### 3. Run Setup
18
-
19
- ```powershell
20
- .\setup-windows.ps1
21
- ```
22
-
23
- This script will:
24
- - Check PowerShell version (5.1+)
25
- - Create `.claude` directories
26
- - Let you choose TTS provider (Piper or SAPI)
27
- - Install Piper if you choose it
28
- - Download a default voice model
29
- - Test TTS
30
- - Configure for first use
31
-
32
- ### 4. Install Dependencies
33
-
34
- ```powershell
35
- npm install
36
- ```
37
-
38
- ### 5. Start Using AgentVibes
39
-
40
- Open a Claude Code session in this project. The SessionStart hook will automatically inject TTS protocol instructions, causing Claude to speak all responses.
41
-
42
- ## TTS Providers
43
-
44
- ### Option 1: Soprano (Best Quality)
45
- - **Quality**: Ultra-high (80M parameter neural model)
46
- - **Voices**: Single high-quality voice (Soprano-1.1-80M)
47
- - **Download**: `pip install soprano-tts`
48
- - **Setup**: Start WebUI with `soprano-webui` or API with `uvicorn soprano.server:app`
49
- - **Speed**: GPU-accelerated, very fast
50
- - **Features**: Gradio WebUI mode, OpenAI-compatible API mode, CLI fallback
51
-
52
- To set up Soprano:
53
- ```powershell
54
- # Install Soprano
55
- pip install soprano-tts
56
-
57
- # Start WebUI (recommended - stays running in background)
58
- soprano-webui
59
-
60
- # Set provider
61
- .\.claude\hooks-windows\provider-manager.ps1 set soprano
62
-
63
- # Test
64
- .\.claude\hooks-windows\play-tts-soprano.ps1 "Hello from Soprano"
65
- ```
66
-
67
- ### Option 2: Windows Piper (Recommended for Offline)
68
- - **Quality**: High (neural voices)
69
- - **Voices**: 50+ available
70
- - **Download**: ~100MB
71
- - **Setup**: Automatic (run `setup-windows.ps1`)
72
- - **Speed**: Offline synthesis
73
- - **Features**: All AgentVibes features supported
74
-
75
- ### Option 3: Windows SAPI (Built-in, Zero Setup)
76
- - **Quality**: Basic
77
- - **Voices**: ~10 built-in (David, Zira, Mark)
78
- - **Download**: 0 MB (no installation needed)
79
- - **Setup**: Select during `setup-windows.ps1`
80
- - **Speed**: Fast
81
- - **Features**: Core TTS only
82
-
83
- ## Claude Code Integration
84
-
85
- AgentVibes hooks into Claude Code via `.claude/settings.json`. The SessionStart hook runs automatically when Claude starts a session:
86
-
87
- ```json
88
- {
89
- "hooks": {
90
- "SessionStart": [{
91
- "hooks": [{
92
- "type": "command",
93
- "command": "powershell -NoProfile -ExecutionPolicy Bypass -File \"$CLAUDE_PROJECT_DIR\\.claude\\hooks-windows\\session-start-tts.ps1\""
94
- }]
95
- }]
96
- }
97
- }
98
- ```
99
-
100
- This injects TTS protocol instructions so Claude speaks every response using the configured provider.
101
-
102
- ## Manual Commands
103
-
104
- Test TTS manually:
105
-
106
- ```powershell
107
- # Test current provider
108
- .\.claude\hooks-windows\play-tts.ps1 "Hello from Windows"
109
-
110
- # Test specific providers
111
- .\.claude\hooks-windows\play-tts-windows-sapi.ps1 "Hello SAPI"
112
- .\.claude\hooks-windows\play-tts-windows-piper.ps1 "Hello Piper"
113
- .\.claude\hooks-windows\play-tts-soprano.ps1 "Hello Soprano"
114
-
115
- # List available voices
116
- .\.claude\hooks-windows\voice-manager-windows.ps1 list
117
-
118
- # Switch voice (for Piper/SAPI)
119
- .\.claude\hooks-windows\voice-manager-windows.ps1 switch "en_US-lessac-high"
120
-
121
- # List providers
122
- .\.claude\hooks-windows\provider-manager.ps1 list
123
-
124
- # Switch provider
125
- .\.claude\hooks-windows\provider-manager.ps1 set soprano
126
- .\.claude\hooks-windows\provider-manager.ps1 set windows-piper
127
- .\.claude\hooks-windows\provider-manager.ps1 set windows-sapi
128
- ```
129
-
130
- ## Troubleshooting
131
-
132
- ### PowerShell Execution Policy Error
133
-
134
- If you get an "execution policy" error, run:
135
-
136
- ```powershell
137
- Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
138
- ```
139
-
140
- Then try again.
141
-
142
- ### No Audio Playing
143
-
144
- 1. Check Windows volume isn't muted
145
- 2. Try switching to SAPI provider (zero-setup): `.\.claude\hooks-windows\provider-manager.ps1 set windows-sapi`
146
- 3. Test SAPI directly: `.\.claude\hooks-windows\play-tts-windows-sapi.ps1 "test"`
147
-
148
- ### Soprano Not Detected
149
-
150
- 1. Ensure soprano-webui is running: `soprano-webui`
151
- 2. Check port 7860 is accessible: `Test-NetConnection -ComputerName 127.0.0.1 -Port 7860`
152
- 3. Set custom port if needed: `$env:SOPRANO_PORT = "8080"` before running TTS
153
-
154
- ### Piper Installation Failed
155
-
156
- 1. Check internet connection
157
- 2. Run setup again: `.\setup-windows.ps1`
158
- 3. Or manually download from: https://github.com/rhasspy/piper/releases
159
-
160
- ### Can't Find Voice
161
-
162
- For Piper, voices are stored in: `%USERPROFILE%\.claude\piper-voices\`
163
-
164
- You can download additional voices with `.\download-piper-voices.ps1`.
165
-
166
- ## Architecture
167
-
168
- ```
169
- agentvibes-in-windows/
170
- ├── .claude/
171
- │ ├── hooks-windows/ # PowerShell TTS scripts
172
- │ │ ├── play-tts.ps1 # Main router (dispatches to active provider)
173
- │ │ ├── play-tts-soprano.ps1 # Soprano provider
174
- │ │ ├── play-tts-windows-piper.ps1 # Piper provider
175
- │ │ ├── play-tts-windows-sapi.ps1 # SAPI provider
176
- │ │ ├── soprano-gradio-synth.py # Python helper for Soprano Gradio API
177
- │ │ ├── provider-manager.ps1 # Provider switching
178
- │ │ ├── voice-manager-windows.ps1 # Voice management
179
- │ │ ├── session-start-tts.ps1 # SessionStart hook (injects TTS protocol)
180
- │ │ └── audio-cache-utils.ps1 # Audio cache cleanup
181
- │ ├── settings.json # Claude Code hooks config
182
- │ ├── audio/ # Audio cache (auto-created)
183
- │ ├── piper-voices/ # Piper voice models (auto-created)
184
- │ └── tts-provider.txt # Active provider config
185
- ├── setup-windows.ps1 # Installation script
186
- ├── download-piper-voices.ps1 # Download additional Piper voices
187
- └── WINDOWS-SETUP.md # This file
188
- ```
189
-
190
- ## What's Different from WSL
191
-
192
- | Feature | WSL Version | Windows Native |
193
- |---------|-------------|----------------|
194
- | **TTS Scripts** | Bash shell scripts (.sh) | PowerShell scripts (.ps1) |
195
- | **Audio** | PulseAudio/paplay | System.Media.SoundPlayer |
196
- | **Providers** | Piper, macOS, Termux, Soprano | Piper, SAPI, Soprano |
197
- | **Setup** | WSL + PulseAudio config | Native Windows only |
198
- | **Hook Dir** | `.claude/hooks/` | `.claude/hooks-windows/` |
199
-
200
- ## Support
201
-
202
- - **Documentation**: https://agentvibes.org
203
- - **Issues**: https://github.com/paulpreibisch/AgentVibes/issues
204
-
205
- ---
206
-
207
- **Version**: 2.0 (Windows Native + Soprano)
208
- **Last Updated**: 2026-02-11
1
+ # AgentVibes Windows Native Setup
2
+
3
+ This folder contains AgentVibes configured for **native Windows** (not WSL) with three TTS providers available.
4
+
5
+ ## Quick Start
6
+
7
+ ### 1. Open in VS Code (Native Windows)
8
+
9
+ - **File > Open Folder** > Select this folder (`agentvibes-in-windows`)
10
+ - Make sure you're opening in **native Windows VS Code** (not WSL remote)
11
+
12
+ ### 2. Open PowerShell Terminal
13
+
14
+ - **Terminal > New Terminal**
15
+ - Change shell to **PowerShell** (if needed)
16
+
17
+ ### 3. Run Setup
18
+
19
+ ```powershell
20
+ .\setup-windows.ps1
21
+ ```
22
+
23
+ This script will:
24
+ - Check PowerShell version (5.1+)
25
+ - Create `.claude` directories
26
+ - Let you choose TTS provider (Piper or SAPI)
27
+ - Install Piper if you choose it
28
+ - Download a default voice model
29
+ - Test TTS
30
+ - Configure for first use
31
+
32
+ ### 4. Install Dependencies
33
+
34
+ ```powershell
35
+ npm install
36
+ ```
37
+
38
+ ### 5. Start Using AgentVibes
39
+
40
+ Open a Claude Code session in this project. The SessionStart hook will automatically inject TTS protocol instructions, causing Claude to speak all responses.
41
+
42
+ ## TTS Providers
43
+
44
+ ### Option 1: Soprano (Best Quality)
45
+ - **Quality**: Ultra-high (80M parameter neural model)
46
+ - **Voices**: Single high-quality voice (Soprano-1.1-80M)
47
+ - **Download**: `pip install soprano-tts`
48
+ - **Setup**: Start WebUI with `soprano-webui` or API with `uvicorn soprano.server:app`
49
+ - **Speed**: GPU-accelerated, very fast
50
+ - **Features**: Gradio WebUI mode, OpenAI-compatible API mode, CLI fallback
51
+
52
+ To set up Soprano:
53
+ ```powershell
54
+ # Install Soprano
55
+ pip install soprano-tts
56
+
57
+ # Start WebUI (recommended - stays running in background)
58
+ soprano-webui
59
+
60
+ # Set provider
61
+ .\.claude\hooks-windows\provider-manager.ps1 set soprano
62
+
63
+ # Test
64
+ .\.claude\hooks-windows\play-tts-soprano.ps1 "Hello from Soprano"
65
+ ```
66
+
67
+ ### Option 2: Windows Piper (Recommended for Offline)
68
+ - **Quality**: High (neural voices)
69
+ - **Voices**: 50+ available
70
+ - **Download**: ~100MB
71
+ - **Setup**: Automatic (run `setup-windows.ps1`)
72
+ - **Speed**: Offline synthesis
73
+ - **Features**: All AgentVibes features supported
74
+
75
+ ### Option 3: Windows SAPI (Built-in, Zero Setup)
76
+ - **Quality**: Basic
77
+ - **Voices**: ~10 built-in (David, Zira, Mark)
78
+ - **Download**: 0 MB (no installation needed)
79
+ - **Setup**: Select during `setup-windows.ps1`
80
+ - **Speed**: Fast
81
+ - **Features**: Core TTS only
82
+
83
+ ## Claude Code Integration
84
+
85
+ AgentVibes hooks into Claude Code via `.claude/settings.json`. The SessionStart hook runs automatically when Claude starts a session:
86
+
87
+ ```json
88
+ {
89
+ "hooks": {
90
+ "SessionStart": [{
91
+ "hooks": [{
92
+ "type": "command",
93
+ "command": "powershell -NoProfile -ExecutionPolicy Bypass -File \"$CLAUDE_PROJECT_DIR\\.claude\\hooks-windows\\session-start-tts.ps1\""
94
+ }]
95
+ }]
96
+ }
97
+ }
98
+ ```
99
+
100
+ This injects TTS protocol instructions so Claude speaks every response using the configured provider.
101
+
102
+ ## Manual Commands
103
+
104
+ Test TTS manually:
105
+
106
+ ```powershell
107
+ # Test current provider
108
+ .\.claude\hooks-windows\play-tts.ps1 "Hello from Windows"
109
+
110
+ # Test specific providers
111
+ .\.claude\hooks-windows\play-tts-windows-sapi.ps1 "Hello SAPI"
112
+ .\.claude\hooks-windows\play-tts-windows-piper.ps1 "Hello Piper"
113
+ .\.claude\hooks-windows\play-tts-soprano.ps1 "Hello Soprano"
114
+
115
+ # List available voices
116
+ .\.claude\hooks-windows\voice-manager-windows.ps1 list
117
+
118
+ # Switch voice (for Piper/SAPI)
119
+ .\.claude\hooks-windows\voice-manager-windows.ps1 switch "en_US-lessac-high"
120
+
121
+ # List providers
122
+ .\.claude\hooks-windows\provider-manager.ps1 list
123
+
124
+ # Switch provider
125
+ .\.claude\hooks-windows\provider-manager.ps1 set soprano
126
+ .\.claude\hooks-windows\provider-manager.ps1 set windows-piper
127
+ .\.claude\hooks-windows\provider-manager.ps1 set windows-sapi
128
+ ```
129
+
130
+ ## Troubleshooting
131
+
132
+ ### PowerShell Execution Policy Error
133
+
134
+ If you get an "execution policy" error, run:
135
+
136
+ ```powershell
137
+ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
138
+ ```
139
+
140
+ Then try again.
141
+
142
+ ### No Audio Playing
143
+
144
+ 1. Check Windows volume isn't muted
145
+ 2. Try switching to SAPI provider (zero-setup): `.\.claude\hooks-windows\provider-manager.ps1 set windows-sapi`
146
+ 3. Test SAPI directly: `.\.claude\hooks-windows\play-tts-windows-sapi.ps1 "test"`
147
+
148
+ ### Soprano Not Detected
149
+
150
+ 1. Ensure soprano-webui is running: `soprano-webui`
151
+ 2. Check port 7860 is accessible: `Test-NetConnection -ComputerName 127.0.0.1 -Port 7860`
152
+ 3. Set custom port if needed: `$env:SOPRANO_PORT = "8080"` before running TTS
153
+
154
+ ### Piper Installation Failed
155
+
156
+ 1. Check internet connection
157
+ 2. Run setup again: `.\setup-windows.ps1`
158
+ 3. Or manually download from: https://github.com/rhasspy/piper/releases
159
+
160
+ ### Can't Find Voice
161
+
162
+ For Piper, voices are stored in: `%USERPROFILE%\.claude\piper-voices\`
163
+
164
+ You can download additional voices with `.\download-piper-voices.ps1`.
165
+
166
+ ## Architecture
167
+
168
+ ```
169
+ agentvibes-in-windows/
170
+ ├── .claude/
171
+ │ ├── hooks-windows/ # PowerShell TTS scripts
172
+ │ │ ├── play-tts.ps1 # Main router (dispatches to active provider)
173
+ │ │ ├── play-tts-soprano.ps1 # Soprano provider
174
+ │ │ ├── play-tts-windows-piper.ps1 # Piper provider
175
+ │ │ ├── play-tts-windows-sapi.ps1 # SAPI provider
176
+ │ │ ├── soprano-gradio-synth.py # Python helper for Soprano Gradio API
177
+ │ │ ├── provider-manager.ps1 # Provider switching
178
+ │ │ ├── voice-manager-windows.ps1 # Voice management
179
+ │ │ ├── session-start-tts.ps1 # SessionStart hook (injects TTS protocol)
180
+ │ │ └── audio-cache-utils.ps1 # Audio cache cleanup
181
+ │ ├── settings.json # Claude Code hooks config
182
+ │ ├── audio/ # Audio cache (auto-created)
183
+ │ ├── piper-voices/ # Piper voice models (auto-created)
184
+ │ └── tts-provider.txt # Active provider config
185
+ ├── setup-windows.ps1 # Installation script
186
+ ├── download-piper-voices.ps1 # Download additional Piper voices
187
+ └── WINDOWS-SETUP.md # This file
188
+ ```
189
+
190
+ ## What's Different from WSL
191
+
192
+ | Feature | WSL Version | Windows Native |
193
+ |---------|-------------|----------------|
194
+ | **TTS Scripts** | Bash shell scripts (.sh) | PowerShell scripts (.ps1) |
195
+ | **Audio** | PulseAudio/paplay | System.Media.SoundPlayer |
196
+ | **Providers** | Piper, macOS, Termux, Soprano | Piper, SAPI, Soprano |
197
+ | **Setup** | WSL + PulseAudio config | Native Windows only |
198
+ | **Hook Dir** | `.claude/hooks/` | `.claude/hooks-windows/` |
199
+
200
+ ## Support
201
+
202
+ - **Documentation**: https://agentvibes.org
203
+ - **Issues**: https://github.com/paulpreibisch/AgentVibes/issues
204
+
205
+ ---
206
+
207
+ **Version**: 2.0 (Windows Native + Soprano)
208
+ **Last Updated**: 2026-02-11
package/bin/agent-vibes CHANGED
File without changes
@@ -474,6 +474,51 @@ class AgentVibesVoiceBrowser {
474
474
  this.screen.render();
475
475
  }
476
476
 
477
+ /**
478
+ * Apply audio effects (reverb, background music) via audio-processor.sh.
479
+ * Falls back to rawFile if the processor is unavailable or fails.
480
+ * @param {string} rawFile - Path to the raw piper-generated WAV
481
+ * @returns {Promise<string>} Path to processed WAV (or rawFile on failure)
482
+ */
483
+ async applyEffects(rawFile) {
484
+ // Find audio-processor.sh relative to this script (bin/../.claude/hooks/)
485
+ const processorPath = path.resolve(path.join(__dirname, '..', '.claude', 'hooks', 'audio-processor.sh'));
486
+
487
+ // SECURITY: Validate path stays within the expected hooks directory
488
+ const hooksDir = path.resolve(path.join(__dirname, '..', '.claude', 'hooks'));
489
+ if (!processorPath.startsWith(hooksDir + path.sep) && processorPath !== hooksDir) {
490
+ return rawFile;
491
+ }
492
+
493
+ if (!fsSync.existsSync(processorPath)) {
494
+ return rawFile;
495
+ }
496
+
497
+ const processedFile = rawFile.replace(/\.wav$/, '-preview-proc.wav');
498
+ const env = { ...process.env, CLAUDE_PROJECT_DIR: process.cwd() };
499
+
500
+ return new Promise((resolve) => {
501
+ // Use 'bash' prefix so the script works even without execute permission (NPX cache)
502
+ const proc = spawn('bash', [processorPath, rawFile, 'llm:claude-code', processedFile, ''], {
503
+ stdio: ['ignore', 'pipe', 'ignore'],
504
+ env
505
+ });
506
+
507
+ proc.on('close', (code) => {
508
+ let stat;
509
+ try { stat = fsSync.statSync(processedFile); } catch { stat = null; }
510
+ if (code === 0 && stat && stat.size > 0) {
511
+ resolve(processedFile);
512
+ } else {
513
+ try { fsSync.unlinkSync(processedFile); } catch { /* ignore */ }
514
+ resolve(rawFile);
515
+ }
516
+ });
517
+
518
+ proc.on('error', () => resolve(rawFile));
519
+ });
520
+ }
521
+
477
522
  async playSample(row) {
478
523
  if (this.currentAudioProcess) {
479
524
  try {
@@ -574,10 +619,13 @@ class AgentVibesVoiceBrowser {
574
619
  }
575
620
  }
576
621
 
622
+ // Apply audio effects (reverb, background music) before playback
623
+ const playFile = await this.applyEffects(outputFile);
624
+
577
625
  const players = [
578
- { cmd: 'aplay', args: [outputFile] },
579
- { cmd: 'paplay', args: [outputFile] },
580
- { cmd: 'ffplay', args: ['-nodisp', '-autoexit', outputFile] }
626
+ { cmd: 'aplay', args: [playFile] },
627
+ { cmd: 'paplay', args: [playFile] },
628
+ { cmd: 'ffplay', args: ['-nodisp', '-autoexit', playFile] }
581
629
  ];
582
630
 
583
631
  for (const player of players) {
@@ -592,14 +640,21 @@ class AgentVibesVoiceBrowser {
592
640
  if (this.currentAudioProcess === audioProcess) {
593
641
  this.currentAudioProcess = null;
594
642
  }
643
+ // Clean up processed preview file (not the cached raw file)
644
+ if (playFile !== outputFile) {
645
+ try { fsSync.unlinkSync(playFile); } catch { /* ignore */ }
646
+ }
595
647
  this.statusBar.setContent(`{green-fg}✓ Played ${row.name}{/green-fg}`);
596
648
  this.screen.render();
597
649
  });
598
650
 
599
- audioProcess.on('error', (err) => {
651
+ audioProcess.on('error', () => {
600
652
  if (this.currentAudioProcess === audioProcess) {
601
653
  this.currentAudioProcess = null;
602
654
  }
655
+ if (playFile !== outputFile) {
656
+ try { fsSync.unlinkSync(playFile); } catch { /* ignore */ }
657
+ }
603
658
  });
604
659
 
605
660
  break;
package/bin/agentvibes.js CHANGED
File without changes