agentvibes 5.2.1 → 5.4.0
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.
- package/.agentvibes/LITE-MODE.md +236 -0
- package/.agentvibes/README.md +136 -0
- package/.agentvibes/backup/session-start-tts.sh.20251210_212814 +141 -0
- package/.agentvibes/backups/agents/analyst_20260204_144958.md +78 -0
- package/.agentvibes/backups/agents/architect_20260204_144958.md +72 -0
- package/.agentvibes/backups/agents/dev_20260204_144958.md +74 -0
- package/.agentvibes/backups/agents/pm_20260204_144958.md +72 -0
- package/.agentvibes/backups/agents/quick-flow-solo-dev_20260204_144958.md +64 -0
- package/.agentvibes/backups/agents/sm_20260204_144958.md +87 -0
- package/.agentvibes/backups/agents/tea_20260204_144958.md +79 -0
- package/.agentvibes/backups/agents/tech-writer_20260204_144958.md +82 -0
- package/.agentvibes/backups/agents/ux-designer_20260204_144958.md +80 -0
- package/.agentvibes/bmad/bmad-voices.md +69 -69
- package/.agentvibes/config/README-personality-defaults.md +162 -0
- package/.agentvibes/config/mode.txt +1 -0
- package/.agentvibes/config/personality-voice-defaults.default.json +21 -0
- package/.agentvibes/config/save-audio.txt +1 -0
- package/.agentvibes/config/voice-metadata.json +160 -0
- package/.agentvibes/config.json +24 -15
- package/.agentvibes/hooks/help.sh +191 -0
- package/.agentvibes/hooks/post-tool-use-lite.sh +111 -0
- package/.agentvibes/hooks/save-audio-manager.sh +162 -0
- package/.agentvibes/hooks/session-start-full-optimized.sh +102 -0
- package/.agentvibes/hooks/session-start-full.sh +142 -0
- package/.agentvibes/hooks/session-start-lite-v2.sh +34 -0
- package/.agentvibes/hooks/session-start-lite.sh +29 -0
- package/.agentvibes/hooks/stop-lite.sh +115 -0
- package/.agentvibes/hooks/switch-mode.sh +215 -0
- package/.agentvibes/output-styles/audio-summary.md +30 -0
- package/.claude/activation-instructions +54 -54
- package/.claude/audio/voice-samples/piper/alan.wav +0 -0
- package/.claude/audio/voice-samples/piper/amy.wav +0 -0
- package/.claude/audio/voice-samples/piper/charlotte.wav +0 -0
- package/.claude/audio/voice-samples/piper/joe.wav +0 -0
- package/.claude/audio/voice-samples/piper/john.wav +0 -0
- package/.claude/audio/voice-samples/piper/katherine.wav +0 -0
- package/.claude/audio/voice-samples/piper/kristin.wav +0 -0
- package/.claude/audio/voice-samples/piper/linda.wav +0 -0
- package/.claude/audio/voice-samples/piper/marcus.wav +0 -0
- package/.claude/audio/voice-samples/piper/ryan.wav +0 -0
- package/.claude/commands/agent-vibes/add.md +21 -21
- package/.claude/commands/agent-vibes/agent-vibes.md +101 -101
- package/.claude/commands/agent-vibes/agent.md +79 -79
- package/.claude/commands/agent-vibes/background-music.md +111 -111
- package/.claude/commands/agent-vibes/bmad.md +198 -198
- package/.claude/commands/agent-vibes/clean.md +18 -18
- package/.claude/commands/agent-vibes/cleanup.md +18 -18
- package/.claude/commands/agent-vibes/commands.json +145 -145
- package/.claude/commands/agent-vibes/effects.md +97 -97
- package/.claude/commands/agent-vibes/get.md +9 -9
- package/.claude/commands/agent-vibes/hide.md +91 -91
- package/.claude/commands/agent-vibes/language.md +23 -23
- package/.claude/commands/agent-vibes/learn.md +67 -67
- package/.claude/commands/agent-vibes/list.md +13 -13
- package/.claude/commands/agent-vibes/mute.md +37 -37
- package/.claude/commands/agent-vibes/preview.md +17 -17
- package/.claude/commands/agent-vibes/provider.md +68 -68
- package/.claude/commands/agent-vibes/replay-target.md +14 -14
- package/.claude/commands/agent-vibes/sample.md +12 -12
- package/.claude/commands/agent-vibes/set-favorite-voice.md +84 -84
- package/.claude/commands/agent-vibes/set-pretext.md +65 -65
- package/.claude/commands/agent-vibes/set-speed.md +41 -41
- package/.claude/commands/agent-vibes/show.md +84 -84
- package/.claude/commands/agent-vibes/switch.md +87 -87
- package/.claude/commands/agent-vibes/target-voice.md +26 -26
- package/.claude/commands/agent-vibes/target.md +30 -30
- package/.claude/commands/agent-vibes/translate.md +68 -68
- package/.claude/commands/agent-vibes/unmute.md +45 -45
- package/.claude/commands/agent-vibes/whoami.md +7 -7
- package/.claude/commands/agent-vibes-bmad-voices.md +117 -117
- package/.claude/commands/agent-vibes-rdp.md +24 -24
- package/.claude/config/audio-effects.cfg +4 -11
- package/.claude/config/audio-effects.cfg.sample +52 -52
- package/.claude/config/background-music-position.txt +27 -0
- package/.claude/config/background-music-volume.txt +1 -1
- package/.claude/config/background-music.cfg +1 -0
- package/.claude/config/background-music.txt +1 -0
- package/.claude/config/tts-speech-rate.txt +1 -4
- package/.claude/config/tts-verbosity.txt +1 -0
- package/.claude/docs/TERMUX_SETUP.md +408 -408
- package/.claude/github-star-reminder.txt +1 -1
- package/.claude/hooks/README-TTS-QUEUE.md +135 -135
- package/.claude/hooks/audio-cache-utils.sh +0 -0
- package/.claude/hooks/audio-processor.sh +60 -14
- package/.claude/hooks/background-music-manager.sh +0 -0
- package/.claude/hooks/bmad-party-manager.sh +225 -0
- package/.claude/hooks/bmad-speak-enhanced.sh +0 -0
- package/.claude/hooks/bmad-speak.sh +6 -13
- package/.claude/hooks/bmad-tts-injector.sh +0 -0
- package/.claude/hooks/bmad-voice-manager.sh +0 -0
- package/.claude/hooks/clawdbot-receiver-SECURE.sh +25 -23
- package/.claude/hooks/clawdbot-receiver.sh +4 -28
- package/.claude/hooks/clean-audio-cache.sh +0 -0
- package/.claude/hooks/cleanup-cache.sh +0 -0
- package/.claude/hooks/configure-rdp-mode.sh +0 -0
- package/.claude/hooks/download-extra-voices.sh +0 -0
- package/.claude/hooks/effects-manager.sh +0 -0
- package/.claude/hooks/github-star-reminder.sh +0 -0
- package/.claude/hooks/language-manager.sh +0 -0
- package/.claude/hooks/learn-manager.sh +0 -0
- package/.claude/hooks/macos-voice-manager.sh +0 -0
- package/.claude/hooks/migrate-background-music.sh +0 -0
- package/.claude/hooks/migrate-to-agentvibes.sh +0 -0
- package/.claude/hooks/optimize-background-music.sh +0 -0
- package/.claude/hooks/personality-manager.sh +0 -0
- package/.claude/hooks/piper-download-voices.sh +0 -0
- package/.claude/hooks/piper-installer.sh +1 -1
- package/.claude/hooks/piper-multispeaker-registry.sh +0 -0
- package/.claude/hooks/piper-voice-manager.sh +0 -0
- package/.claude/hooks/play-tts-enhanced.sh +0 -0
- package/.claude/hooks/play-tts-macos.sh +6 -12
- package/.claude/hooks/play-tts-piper.sh +50 -79
- package/.claude/hooks/play-tts-soprano.sh +9 -43
- package/.claude/hooks/play-tts-ssh-remote.sh +42 -120
- package/.claude/hooks/play-tts-termux-ssh.sh +0 -0
- package/.claude/hooks/play-tts.sh +48 -37
- package/.claude/hooks/post-response.sh +41 -0
- package/.claude/hooks/prepare-release.sh +0 -0
- package/.claude/hooks/provider-commands.sh +0 -0
- package/.claude/hooks/provider-manager.sh +0 -0
- package/.claude/hooks/replay-target-audio.sh +0 -0
- package/.claude/hooks/requirements.txt +6 -6
- package/.claude/hooks/sentiment-manager.sh +0 -0
- package/.claude/hooks/session-start-tts.sh +56 -39
- package/.claude/hooks/soprano-gradio-synth.py +139 -139
- package/.claude/hooks/speed-manager.sh +0 -0
- package/.claude/hooks/stop.sh +63 -0
- package/.claude/hooks/termux-installer.sh +0 -0
- package/.claude/hooks/translate-manager.sh +0 -0
- package/.claude/hooks/translator.py +237 -237
- package/.claude/hooks/tts-queue-worker.sh +0 -0
- package/.claude/hooks/tts-queue.sh +0 -0
- package/.claude/hooks/verbosity-manager.sh +0 -0
- package/.claude/hooks/voice-manager.sh +26 -4
- package/.claude/hooks-windows/audio-cache-utils.ps1 +119 -119
- package/.claude/hooks-windows/bmad-party-speak.ps1 +278 -274
- package/.claude/hooks-windows/bmad-speak.ps1 +264 -264
- package/.claude/hooks-windows/clean-audio-cache.ps1 +53 -53
- package/.claude/hooks-windows/effects-manager.ps1 +294 -294
- package/.claude/hooks-windows/language-manager.ps1 +193 -193
- package/.claude/hooks-windows/learn-manager.ps1 +241 -241
- package/.claude/hooks-windows/personality-manager.ps1 +266 -266
- package/.claude/hooks-windows/play-tts-soprano.ps1 +5 -5
- package/.claude/hooks-windows/play-tts-termux-ssh.ps1 +138 -138
- package/.claude/hooks-windows/play-tts-windows-piper.ps1 +164 -0
- package/.claude/hooks-windows/play-tts-windows-sapi.ps1 +108 -0
- package/.claude/hooks-windows/play-tts.ps1 +104 -481
- package/.claude/hooks-windows/provider-manager.ps1 +158 -192
- package/.claude/hooks-windows/session-start-tts.ps1 +55 -46
- package/.claude/hooks-windows/soprano-gradio-synth.py +153 -153
- package/.claude/hooks-windows/speed-manager.ps1 +166 -166
- package/.claude/hooks-windows/voice-manager-windows.ps1 +176 -260
- package/.claude/output-styles/agent-vibes.md +202 -202
- package/.claude/personalities/angry.md +14 -14
- package/.claude/personalities/annoying.md +14 -14
- package/.claude/personalities/crass.md +14 -14
- package/.claude/personalities/dramatic.md +14 -14
- package/.claude/personalities/dry-humor.md +50 -50
- package/.claude/personalities/flirty.md +20 -20
- package/.claude/personalities/funny.md +14 -14
- package/.claude/personalities/grandpa.md +32 -32
- package/.claude/personalities/millennial.md +14 -14
- package/.claude/personalities/moody.md +14 -14
- package/.claude/personalities/normal.md +16 -16
- package/.claude/personalities/pirate.md +14 -14
- package/.claude/personalities/poetic.md +14 -14
- package/.claude/personalities/professional.md +14 -14
- package/.claude/personalities/rapper.md +55 -55
- package/.claude/personalities/robot.md +14 -14
- package/.claude/personalities/sarcastic.md +38 -38
- package/.claude/personalities/sassy.md +14 -14
- package/.claude/personalities/surfer-dude.md +14 -14
- package/.claude/personalities/zen.md +14 -14
- package/.claude/piper-voices-dir.txt +1 -0
- package/.claude/settings.json +25 -15
- package/.claude/verbosity.txt +1 -1
- package/.clawdbot/README.md +105 -105
- package/.clawdbot/skill/SKILL.md +149 -145
- package/.mcp.json +30 -11
- package/CLAUDE.md +170 -215
- package/README.md +206 -515
- package/RELEASE_NOTES.md +1132 -1884
- package/WINDOWS-SETUP.md +208 -208
- package/bin/agent-vibes +0 -0
- package/bin/agentvibes-voice-browser.js +64 -1289
- package/bin/agentvibes.js +0 -0
- package/bin/ensure-soprano-running.sh +43 -0
- package/bin/mcp-server.js +121 -121
- package/bin/mcp-server.sh +0 -0
- package/bin/test-bmad-pr +78 -78
- package/mcp-server/QUICK_START.md +203 -203
- package/mcp-server/README.md +345 -345
- package/mcp-server/WINDOWS_SETUP.md +260 -260
- package/mcp-server/docs/troubleshooting-audio.md +313 -313
- package/mcp-server/examples/claude_desktop_config.json +11 -11
- package/mcp-server/examples/claude_desktop_config_piper.json +9 -9
- package/mcp-server/examples/custom_instructions.md +169 -169
- package/mcp-server/install-deps.js +130 -130
- package/mcp-server/pyproject.toml +52 -52
- package/mcp-server/requirements.txt +2 -2
- package/mcp-server/server.py +1451 -1578
- package/mcp-server/test_server.py +395 -395
- package/package.json +1 -3
- package/setup-windows.ps1 +815 -815
- package/src/console/tabs/setup-tab.js +9 -6
- package/src/console/tabs/voices-tab.js +9 -3
- package/src/installer.js +42 -5
- package/src/services/llm-provider-service.js +13 -0
- package/templates/agentvibes-receiver.sh +158 -483
- package/templates/audio/welcome-music.mp3 +0 -0
- package/.agentvibes/bmad-voice-map.json +0 -104
- package/.agentvibes/copilot-sessions.log +0 -4
- package/.claude/config/audio-effects-bmad.cfg +0 -50
- package/.claude/config/background-music-enabled.txt +0 -1
- package/.claude/config/intro-text.txt +0 -1
- package/.claude/config/personality.txt +0 -1
- package/.claude/config/piper-speech-rate.txt +0 -4
- package/.claude/config/piper-target-speech-rate.txt +0 -1
- package/.claude/config/reverb-level.txt +0 -1
- package/.claude/config/tts-target-speech-rate.txt +0 -1
- package/voice-assignments.json +0 -8245
- /package/{.claude → .agentvibes}/config/agentvibes.json +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
20260422
|
|
@@ -1,135 +1,135 @@
|
|
|
1
|
-
# TTS Queue System for Party Mode
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
The TTS Queue System enables BMAD party mode agents to speak sequentially without blocking Claude Code's response generation. This provides the best of both worlds:
|
|
6
|
-
|
|
7
|
-
- ✅ **Non-blocking**: Claude Code continues generating agent responses immediately
|
|
8
|
-
- ✅ **Sequential playback**: Agents speak one at a time in order, with correct voices
|
|
9
|
-
- ✅ **No audio overlap**: The queue ensures voices don't talk over each other
|
|
10
|
-
|
|
11
|
-
## How It Works
|
|
12
|
-
|
|
13
|
-
### Architecture
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
bmad-speak.sh → tts-queue.sh → Queue Directory → tts-queue-worker.sh → play-tts.sh → Audio
|
|
17
|
-
↓ ↓ ↓
|
|
18
|
-
Returns Returns Processes queue
|
|
19
|
-
immediately immediately sequentially
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
### Components
|
|
23
|
-
|
|
24
|
-
1. **`tts-queue.sh`** - Queue manager (adds requests, shows status, clears queue)
|
|
25
|
-
2. **`tts-queue-worker.sh`** - Background worker process (plays audio sequentially)
|
|
26
|
-
3. **`bmad-speak.sh`** - Updated to use queue system with `&` for non-blocking
|
|
27
|
-
4. **Queue directory**: `/tmp/agentvibes-tts-queue/` - Stores pending TTS requests
|
|
28
|
-
|
|
29
|
-
### Flow
|
|
30
|
-
|
|
31
|
-
1. Party mode agent generates response
|
|
32
|
-
2. `bmad-speak.sh` adds TTS request to queue and returns immediately (`&`)
|
|
33
|
-
3. Queue worker automatically starts if needed
|
|
34
|
-
4. Worker processes queue items sequentially (oldest first)
|
|
35
|
-
5. Each audio file plays to completion before next one starts
|
|
36
|
-
6. Worker auto-exits after 5 seconds of idle time
|
|
37
|
-
|
|
38
|
-
## Usage
|
|
39
|
-
|
|
40
|
-
### Normal Usage (Automatic)
|
|
41
|
-
|
|
42
|
-
Party mode automatically uses the queue system. No manual intervention needed.
|
|
43
|
-
|
|
44
|
-
### Manual Queue Management
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
# Check queue status
|
|
48
|
-
bash .claude/hooks/tts-queue.sh status
|
|
49
|
-
|
|
50
|
-
# Clear all pending TTS (emergency stop)
|
|
51
|
-
bash .claude/hooks/tts-queue.sh clear
|
|
52
|
-
|
|
53
|
-
# Manually add to queue
|
|
54
|
-
bash .claude/hooks/tts-queue.sh add "Hello world" "en_US-ryan-high"
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Performance Benefits
|
|
58
|
-
|
|
59
|
-
### Before (Sequential Blocking):
|
|
60
|
-
```
|
|
61
|
-
Agent 1 text output → [WAIT 3s for audio] → Agent 2 text → [WAIT 3s] → Agent 3 text
|
|
62
|
-
Total time: ~9+ seconds
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### After (Queue System):
|
|
66
|
-
```
|
|
67
|
-
Agent 1 text → Agent 2 text → Agent 3 text (all immediate)
|
|
68
|
-
↓
|
|
69
|
-
[Audio plays sequentially in background]
|
|
70
|
-
Total text output time: <1 second
|
|
71
|
-
Total audio time: ~9 seconds (plays while Claude continues working)
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## Technical Details
|
|
75
|
-
|
|
76
|
-
### Queue File Format
|
|
77
|
-
|
|
78
|
-
Each queue item is a timestamped file containing escaped bash variables:
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
TEXT='First\ message\ from\ John'
|
|
82
|
-
VOICE='en_US-ryan-high'
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### Worker Lifecycle
|
|
86
|
-
|
|
87
|
-
- **Start**: Automatically launched when first item added to empty queue
|
|
88
|
-
- **Processing**: Continues while queue has items
|
|
89
|
-
- **Idle timeout**: Exits after 5 seconds with no new items
|
|
90
|
-
- **Auto-restart**: Next queue addition spawns new worker
|
|
91
|
-
|
|
92
|
-
### Thread Safety
|
|
93
|
-
|
|
94
|
-
- Queue items use nanosecond timestamps for uniqueness
|
|
95
|
-
- Worker processes oldest items first (sorted by filename)
|
|
96
|
-
- Audio lock mechanism in `play-tts.sh` prevents actual audio overlap
|
|
97
|
-
- Worker PID tracked in `/tmp/agentvibes-tts-queue/worker.pid`
|
|
98
|
-
|
|
99
|
-
## Troubleshooting
|
|
100
|
-
|
|
101
|
-
### Queue stuck or voices not playing
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
# Check status
|
|
105
|
-
bash .claude/hooks/tts-queue.sh status
|
|
106
|
-
|
|
107
|
-
# Clear queue and restart
|
|
108
|
-
bash .claude/hooks/tts-queue.sh clear
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### Worker not starting
|
|
112
|
-
|
|
113
|
-
Check for errors in the worker script:
|
|
114
|
-
```bash
|
|
115
|
-
bash .claude/hooks/tts-queue-worker.sh
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### Audio still overlapping
|
|
119
|
-
|
|
120
|
-
Verify the lock file mechanism is working:
|
|
121
|
-
```bash
|
|
122
|
-
ls -la /tmp/agentvibes-audio.lock
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
## Files Modified
|
|
126
|
-
|
|
127
|
-
- `.claude/hooks/bmad-speak.sh` - Now uses queue system with `&` for non-blocking
|
|
128
|
-
- `.claude/hooks/tts-queue.sh` - New queue manager (added)
|
|
129
|
-
- `.claude/hooks/tts-queue-worker.sh` - New background worker (added)
|
|
130
|
-
|
|
131
|
-
## Compatibility
|
|
132
|
-
|
|
133
|
-
- Works with both Piper and Piper TTS TTS providers
|
|
134
|
-
- Compatible with all existing BMAD voice mappings
|
|
135
|
-
- No changes needed to party mode workflow instructions
|
|
1
|
+
# TTS Queue System for Party Mode
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
The TTS Queue System enables BMAD party mode agents to speak sequentially without blocking Claude Code's response generation. This provides the best of both worlds:
|
|
6
|
+
|
|
7
|
+
- ✅ **Non-blocking**: Claude Code continues generating agent responses immediately
|
|
8
|
+
- ✅ **Sequential playback**: Agents speak one at a time in order, with correct voices
|
|
9
|
+
- ✅ **No audio overlap**: The queue ensures voices don't talk over each other
|
|
10
|
+
|
|
11
|
+
## How It Works
|
|
12
|
+
|
|
13
|
+
### Architecture
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
bmad-speak.sh → tts-queue.sh → Queue Directory → tts-queue-worker.sh → play-tts.sh → Audio
|
|
17
|
+
↓ ↓ ↓
|
|
18
|
+
Returns Returns Processes queue
|
|
19
|
+
immediately immediately sequentially
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Components
|
|
23
|
+
|
|
24
|
+
1. **`tts-queue.sh`** - Queue manager (adds requests, shows status, clears queue)
|
|
25
|
+
2. **`tts-queue-worker.sh`** - Background worker process (plays audio sequentially)
|
|
26
|
+
3. **`bmad-speak.sh`** - Updated to use queue system with `&` for non-blocking
|
|
27
|
+
4. **Queue directory**: `/tmp/agentvibes-tts-queue/` - Stores pending TTS requests
|
|
28
|
+
|
|
29
|
+
### Flow
|
|
30
|
+
|
|
31
|
+
1. Party mode agent generates response
|
|
32
|
+
2. `bmad-speak.sh` adds TTS request to queue and returns immediately (`&`)
|
|
33
|
+
3. Queue worker automatically starts if needed
|
|
34
|
+
4. Worker processes queue items sequentially (oldest first)
|
|
35
|
+
5. Each audio file plays to completion before next one starts
|
|
36
|
+
6. Worker auto-exits after 5 seconds of idle time
|
|
37
|
+
|
|
38
|
+
## Usage
|
|
39
|
+
|
|
40
|
+
### Normal Usage (Automatic)
|
|
41
|
+
|
|
42
|
+
Party mode automatically uses the queue system. No manual intervention needed.
|
|
43
|
+
|
|
44
|
+
### Manual Queue Management
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Check queue status
|
|
48
|
+
bash .claude/hooks/tts-queue.sh status
|
|
49
|
+
|
|
50
|
+
# Clear all pending TTS (emergency stop)
|
|
51
|
+
bash .claude/hooks/tts-queue.sh clear
|
|
52
|
+
|
|
53
|
+
# Manually add to queue
|
|
54
|
+
bash .claude/hooks/tts-queue.sh add "Hello world" "en_US-ryan-high"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Performance Benefits
|
|
58
|
+
|
|
59
|
+
### Before (Sequential Blocking):
|
|
60
|
+
```
|
|
61
|
+
Agent 1 text output → [WAIT 3s for audio] → Agent 2 text → [WAIT 3s] → Agent 3 text
|
|
62
|
+
Total time: ~9+ seconds
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### After (Queue System):
|
|
66
|
+
```
|
|
67
|
+
Agent 1 text → Agent 2 text → Agent 3 text (all immediate)
|
|
68
|
+
↓
|
|
69
|
+
[Audio plays sequentially in background]
|
|
70
|
+
Total text output time: <1 second
|
|
71
|
+
Total audio time: ~9 seconds (plays while Claude continues working)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Technical Details
|
|
75
|
+
|
|
76
|
+
### Queue File Format
|
|
77
|
+
|
|
78
|
+
Each queue item is a timestamped file containing escaped bash variables:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
TEXT='First\ message\ from\ John'
|
|
82
|
+
VOICE='en_US-ryan-high'
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Worker Lifecycle
|
|
86
|
+
|
|
87
|
+
- **Start**: Automatically launched when first item added to empty queue
|
|
88
|
+
- **Processing**: Continues while queue has items
|
|
89
|
+
- **Idle timeout**: Exits after 5 seconds with no new items
|
|
90
|
+
- **Auto-restart**: Next queue addition spawns new worker
|
|
91
|
+
|
|
92
|
+
### Thread Safety
|
|
93
|
+
|
|
94
|
+
- Queue items use nanosecond timestamps for uniqueness
|
|
95
|
+
- Worker processes oldest items first (sorted by filename)
|
|
96
|
+
- Audio lock mechanism in `play-tts.sh` prevents actual audio overlap
|
|
97
|
+
- Worker PID tracked in `/tmp/agentvibes-tts-queue/worker.pid`
|
|
98
|
+
|
|
99
|
+
## Troubleshooting
|
|
100
|
+
|
|
101
|
+
### Queue stuck or voices not playing
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# Check status
|
|
105
|
+
bash .claude/hooks/tts-queue.sh status
|
|
106
|
+
|
|
107
|
+
# Clear queue and restart
|
|
108
|
+
bash .claude/hooks/tts-queue.sh clear
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Worker not starting
|
|
112
|
+
|
|
113
|
+
Check for errors in the worker script:
|
|
114
|
+
```bash
|
|
115
|
+
bash .claude/hooks/tts-queue-worker.sh
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Audio still overlapping
|
|
119
|
+
|
|
120
|
+
Verify the lock file mechanism is working:
|
|
121
|
+
```bash
|
|
122
|
+
ls -la /tmp/agentvibes-audio.lock
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Files Modified
|
|
126
|
+
|
|
127
|
+
- `.claude/hooks/bmad-speak.sh` - Now uses queue system with `&` for non-blocking
|
|
128
|
+
- `.claude/hooks/tts-queue.sh` - New queue manager (added)
|
|
129
|
+
- `.claude/hooks/tts-queue-worker.sh` - New background worker (added)
|
|
130
|
+
|
|
131
|
+
## Compatibility
|
|
132
|
+
|
|
133
|
+
- Works with both Piper and Piper TTS TTS providers
|
|
134
|
+
- Compatible with all existing BMAD voice mappings
|
|
135
|
+
- No changes needed to party mode workflow instructions
|
|
File without changes
|
|
@@ -144,6 +144,42 @@ POSITION_FILE="$SCRIPT_DIR/../config/background-music-position.txt"
|
|
|
144
144
|
# Lock file for position file — prevents race conditions in party mode with concurrent agents
|
|
145
145
|
POSITION_LOCK="/tmp/agentvibes-bgpos-$(id -u).lock"
|
|
146
146
|
|
|
147
|
+
# @function get_custom_music_path
|
|
148
|
+
# @intent Story 4.7: Check for custom music uploaded by user
|
|
149
|
+
# @returns Path to custom music file if exists, empty string otherwise
|
|
150
|
+
# @context Custom music stored at .claude/audio/custom-music/tracks/
|
|
151
|
+
get_custom_music_path() {
|
|
152
|
+
local custom_music_dir="$SCRIPT_DIR/../audio/custom-music/tracks"
|
|
153
|
+
|
|
154
|
+
# Check if custom music directory exists
|
|
155
|
+
if [[ ! -d "$custom_music_dir" ]]; then
|
|
156
|
+
echo ""
|
|
157
|
+
return
|
|
158
|
+
fi
|
|
159
|
+
|
|
160
|
+
# Look for any audio file in custom music directory
|
|
161
|
+
# Files uploaded through Stories 4.1-4.6 are stored here
|
|
162
|
+
# SECURITY: Use -maxdepth 1 to prevent directory traversal
|
|
163
|
+
# DETERMINISTIC: Sort by modification time (newest first) for consistent behavior
|
|
164
|
+
local custom_file
|
|
165
|
+
custom_file=$(find "$custom_music_dir" -maxdepth 1 -type f \( -name "*.mp3" -o -name "*.wav" -o -name "*.ogg" -o -name "*.m4a" \) -printf '%T@ %p\n' 2>/dev/null | sort -rn | head -1 | cut -d' ' -f2-)
|
|
166
|
+
|
|
167
|
+
if [[ -n "$custom_file" ]] && [[ -f "$custom_file" ]]; then
|
|
168
|
+
# SECURITY: Verify file ownership matches current user
|
|
169
|
+
local file_uid
|
|
170
|
+
file_uid=$(stat -c '%u' "$custom_file" 2>/dev/null || stat -f '%u' "$custom_file" 2>/dev/null)
|
|
171
|
+
local current_uid
|
|
172
|
+
current_uid=$(id -u)
|
|
173
|
+
|
|
174
|
+
if [[ "$file_uid" == "$current_uid" ]]; then
|
|
175
|
+
echo "$custom_file"
|
|
176
|
+
return
|
|
177
|
+
fi
|
|
178
|
+
fi
|
|
179
|
+
|
|
180
|
+
echo ""
|
|
181
|
+
}
|
|
182
|
+
|
|
147
183
|
# @function get_background_position
|
|
148
184
|
# @intent Get saved position for a background track (caller must hold POSITION_LOCK)
|
|
149
185
|
# @param $1 Background file path
|
|
@@ -368,10 +404,7 @@ main() {
|
|
|
368
404
|
chmod 700 "$TEMP_DIR"
|
|
369
405
|
|
|
370
406
|
# SECURITY: Verify ownership of temp directory
|
|
371
|
-
|
|
372
|
-
local _dir_uid
|
|
373
|
-
_dir_uid=$(stat -c '%u' "$TEMP_DIR" 2>/dev/null || stat -f '%u' "$TEMP_DIR" 2>/dev/null)
|
|
374
|
-
if [[ -z "$_dir_uid" ]] || [[ "$_dir_uid" != "$(id -u)" ]]; then
|
|
407
|
+
if [[ "$(stat -c '%u' "$TEMP_DIR" 2>/dev/null || stat -f '%u' "$TEMP_DIR" 2>/dev/null)" != "$(id -u)" ]]; then
|
|
375
408
|
echo "Error: Temp directory not owned by current user: $TEMP_DIR" >&2
|
|
376
409
|
exit 1
|
|
377
410
|
fi
|
|
@@ -379,14 +412,12 @@ main() {
|
|
|
379
412
|
# SECURITY: Use mktemp for unpredictable filenames
|
|
380
413
|
local temp_effects
|
|
381
414
|
local temp_final
|
|
382
|
-
|
|
383
|
-
|
|
415
|
+
temp_effects=$(mktemp "$TEMP_DIR/effects-XXXXXX.wav")
|
|
416
|
+
temp_final=$(mktemp "$TEMP_DIR/final-XXXXXX.wav")
|
|
384
417
|
|
|
385
|
-
# Clean up on exit - use
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
cleanup() { rm -f "$_cleanup_effects" "$_cleanup_final"; }
|
|
389
|
-
trap cleanup EXIT
|
|
418
|
+
# Clean up on exit - use double quotes to capture paths at definition time
|
|
419
|
+
# (local variables won't exist at trap execution time outside function scope)
|
|
420
|
+
trap "rm -f '$temp_effects' '$temp_final'" EXIT
|
|
390
421
|
|
|
391
422
|
# Step 1: Apply sox effects
|
|
392
423
|
if [[ -n "$sox_effects" ]]; then
|
|
@@ -397,8 +428,17 @@ main() {
|
|
|
397
428
|
fi
|
|
398
429
|
|
|
399
430
|
# Step 2: Mix background if configured AND enabled
|
|
431
|
+
# Story 4.7: Check for custom music first, then fallback to default
|
|
400
432
|
local background_path=""
|
|
401
|
-
|
|
433
|
+
local custom_music_path
|
|
434
|
+
custom_music_path=$(get_custom_music_path)
|
|
435
|
+
|
|
436
|
+
if [[ -n "$custom_music_path" ]]; then
|
|
437
|
+
# Story 4.7: Custom music uploaded by user takes priority
|
|
438
|
+
background_path="$custom_music_path"
|
|
439
|
+
echo " → Using custom background music" >&2
|
|
440
|
+
elif [[ -n "$background_file" ]]; then
|
|
441
|
+
# Fall back to default background music from audio-effects.cfg
|
|
402
442
|
background_path="$BACKGROUNDS_DIR/$background_file"
|
|
403
443
|
fi
|
|
404
444
|
|
|
@@ -414,8 +454,14 @@ main() {
|
|
|
414
454
|
fi
|
|
415
455
|
|
|
416
456
|
local used_background=""
|
|
417
|
-
if
|
|
418
|
-
|
|
457
|
+
if is_background_music_enabled && [[ -n "$background_path" ]] && [[ -f "$background_path" ]] && [[ "${bg_volume:-0}" != "0" ]] && [[ "${bg_volume:-0}" != "0.0" ]]; then
|
|
458
|
+
local bg_display_name
|
|
459
|
+
if [[ "$background_path" == "$custom_music_path" ]]; then
|
|
460
|
+
bg_display_name="custom music"
|
|
461
|
+
else
|
|
462
|
+
bg_display_name="$background_file"
|
|
463
|
+
fi
|
|
464
|
+
echo " → Mixing background: $bg_display_name at ${bg_volume} volume" >&2
|
|
419
465
|
mix_background "$temp_effects" "$background_path" "$bg_volume" "$temp_final"
|
|
420
466
|
used_background="$background_path" # Return full path instead of just filename
|
|
421
467
|
else
|
|
File without changes
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# File: .claude/hooks/bmad-party-manager.sh
|
|
4
|
+
#
|
|
5
|
+
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
|
|
6
|
+
# Website: https://agentvibes.org
|
|
7
|
+
# Repository: https://github.com/paulpreibisch/AgentVibes
|
|
8
|
+
#
|
|
9
|
+
# Co-created by Paul Preibisch with Claude AI
|
|
10
|
+
# Copyright (c) 2025 Paul Preibisch
|
|
11
|
+
#
|
|
12
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
|
+
# you may not use this file except in compliance with the License.
|
|
14
|
+
# You may obtain a copy of the License at
|
|
15
|
+
#
|
|
16
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
#
|
|
18
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
19
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
20
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
+
# See the License for the specific language governing permissions and
|
|
22
|
+
# limitations under the License.
|
|
23
|
+
#
|
|
24
|
+
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
25
|
+
# express or implied, including but not limited to the warranties of
|
|
26
|
+
# merchantability, fitness for a particular purpose and noninfringement.
|
|
27
|
+
# In no event shall the authors or copyright holders be liable for any claim,
|
|
28
|
+
# damages or other liability, whether in an action of contract, tort or
|
|
29
|
+
# otherwise, arising from, out of or in connection with the software or the
|
|
30
|
+
# use or other dealings in the software.
|
|
31
|
+
#
|
|
32
|
+
# ---
|
|
33
|
+
#
|
|
34
|
+
# @fileoverview BMAD Party Mode Voice Integration Manager
|
|
35
|
+
# @context Controls auto-enable/disable of multi-agent voice switching during BMAD party mode
|
|
36
|
+
# @architecture Opt-out flag management, auto-detection, status reporting
|
|
37
|
+
# @dependencies .bmad/_cfg/agent-manifest.csv, bmad-voices-enabled.flag, user-prompt-output.sh
|
|
38
|
+
# @entrypoints /agent-vibes:bmad-party slash command
|
|
39
|
+
# @patterns Auto-enable with opt-out, graceful degradation, feature detection
|
|
40
|
+
# @related user-prompt-output.sh, bmad-voice-manager.sh, Issue #33
|
|
41
|
+
|
|
42
|
+
# Fix locale warnings
|
|
43
|
+
export LC_ALL=C
|
|
44
|
+
|
|
45
|
+
PLUGIN_DIR=".claude/plugins"
|
|
46
|
+
DISABLE_FLAG="$PLUGIN_DIR/bmad-party-mode-disabled.flag"
|
|
47
|
+
BMAD_VOICES_FLAG="$PLUGIN_DIR/bmad-voices-enabled.flag"
|
|
48
|
+
BMAD_MANIFEST=".bmad/_cfg/agent-manifest.csv"
|
|
49
|
+
|
|
50
|
+
# Colors
|
|
51
|
+
GREEN='\033[0;32m'
|
|
52
|
+
YELLOW='\033[1;33m'
|
|
53
|
+
RED='\033[0;31m'
|
|
54
|
+
CYAN='\033[0;36m'
|
|
55
|
+
GRAY='\033[0;90m'
|
|
56
|
+
NC='\033[0m' # No Color
|
|
57
|
+
|
|
58
|
+
#
|
|
59
|
+
# @function is_bmad_installed
|
|
60
|
+
# @context Check if BMAD v6 is installed
|
|
61
|
+
# @returns 0=installed, 1=not installed
|
|
62
|
+
#
|
|
63
|
+
is_bmad_installed() {
|
|
64
|
+
[[ -f "$BMAD_MANIFEST" ]]
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
#
|
|
68
|
+
# @function is_bmad_voices_enabled
|
|
69
|
+
# @context Check if BMAD voice plugin is enabled
|
|
70
|
+
# @returns 0=enabled, 1=disabled
|
|
71
|
+
#
|
|
72
|
+
is_bmad_voices_enabled() {
|
|
73
|
+
[[ -f "$BMAD_VOICES_FLAG" ]]
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
#
|
|
77
|
+
# @function is_party_mode_enabled
|
|
78
|
+
# @context Check if party mode voice integration is enabled
|
|
79
|
+
# @returns 0=enabled, 1=disabled
|
|
80
|
+
#
|
|
81
|
+
is_party_mode_enabled() {
|
|
82
|
+
# Disabled if opt-out flag exists
|
|
83
|
+
[[ -f "$DISABLE_FLAG" ]] && return 1
|
|
84
|
+
|
|
85
|
+
# Enabled if BMAD + voice plugin active
|
|
86
|
+
is_bmad_installed && is_bmad_voices_enabled
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
#
|
|
90
|
+
# @function show_status
|
|
91
|
+
# @context Display current party mode voice integration status
|
|
92
|
+
#
|
|
93
|
+
show_status() {
|
|
94
|
+
echo -e "${CYAN}🎭 BMAD Party Mode Voice Integration${NC}"
|
|
95
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
96
|
+
echo ""
|
|
97
|
+
|
|
98
|
+
# Check BMAD installation
|
|
99
|
+
if ! is_bmad_installed; then
|
|
100
|
+
echo -e "${RED}❌ BMAD not installed${NC}"
|
|
101
|
+
echo -e "${GRAY} Party mode voice integration requires BMAD v6${NC}"
|
|
102
|
+
echo -e "${GRAY} Install: https://github.com/bmad-method/bmad${NC}"
|
|
103
|
+
echo ""
|
|
104
|
+
return 1
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
echo -e "${GREEN}✅ BMAD v6 detected${NC}"
|
|
108
|
+
|
|
109
|
+
# Check voice plugin
|
|
110
|
+
if ! is_bmad_voices_enabled; then
|
|
111
|
+
echo -e "${RED}❌ BMAD voice plugin disabled${NC}"
|
|
112
|
+
echo -e "${GRAY} Enable: /agent-vibes:bmad enable${NC}"
|
|
113
|
+
echo ""
|
|
114
|
+
return 1
|
|
115
|
+
fi
|
|
116
|
+
|
|
117
|
+
echo -e "${GREEN}✅ BMAD voice plugin enabled${NC}"
|
|
118
|
+
|
|
119
|
+
# Check party mode status
|
|
120
|
+
if is_party_mode_enabled; then
|
|
121
|
+
echo -e "${GREEN}✅ Party mode voices: ENABLED${NC}"
|
|
122
|
+
echo ""
|
|
123
|
+
echo -e "${CYAN}How it works:${NC}"
|
|
124
|
+
echo " When you run /bmad:core:workflows:party-mode,"
|
|
125
|
+
echo " each agent speaks with their unique voice:"
|
|
126
|
+
echo ""
|
|
127
|
+
echo " 🏗️ Winston (Architect) → Michael"
|
|
128
|
+
echo " 📋 John (PM) → Jessica Anne Bogart"
|
|
129
|
+
echo " 💻 Amelia (Dev) → Matthew Schmitz"
|
|
130
|
+
echo " 📊 Mary (Analyst) → kristin"
|
|
131
|
+
echo " ... and more!"
|
|
132
|
+
echo ""
|
|
133
|
+
echo -e "${GRAY}Disable with: /agent-vibes:bmad-party disable${NC}"
|
|
134
|
+
else
|
|
135
|
+
echo -e "${YELLOW}⚠️ Party mode voices: DISABLED (opt-out active)${NC}"
|
|
136
|
+
echo ""
|
|
137
|
+
echo -e "${GRAY}Enable with: /agent-vibes:bmad-party enable${NC}"
|
|
138
|
+
fi
|
|
139
|
+
|
|
140
|
+
echo ""
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
#
|
|
144
|
+
# @function enable_party_mode
|
|
145
|
+
# @context Enable party mode voice integration (remove opt-out flag)
|
|
146
|
+
#
|
|
147
|
+
enable_party_mode() {
|
|
148
|
+
# Verify prerequisites
|
|
149
|
+
if ! is_bmad_installed; then
|
|
150
|
+
echo -e "${RED}❌ Cannot enable: BMAD not installed${NC}"
|
|
151
|
+
echo -e "${GRAY} Install BMAD v6 first${NC}"
|
|
152
|
+
return 1
|
|
153
|
+
fi
|
|
154
|
+
|
|
155
|
+
if ! is_bmad_voices_enabled; then
|
|
156
|
+
echo -e "${RED}❌ Cannot enable: BMAD voice plugin disabled${NC}"
|
|
157
|
+
echo -e "${GRAY} Enable with: /agent-vibes:bmad enable${NC}"
|
|
158
|
+
return 1
|
|
159
|
+
fi
|
|
160
|
+
|
|
161
|
+
# Remove opt-out flag if it exists
|
|
162
|
+
if [[ -f "$DISABLE_FLAG" ]]; then
|
|
163
|
+
rm -f "$DISABLE_FLAG"
|
|
164
|
+
echo -e "${GREEN}✅ Party mode voices enabled${NC}"
|
|
165
|
+
echo ""
|
|
166
|
+
echo -e "${CYAN}🎭 Multi-agent voice switching activated!${NC}"
|
|
167
|
+
echo " Run /bmad:core:workflows:party-mode to hear agents speak"
|
|
168
|
+
else
|
|
169
|
+
echo -e "${GREEN}✅ Party mode voices already enabled${NC}"
|
|
170
|
+
echo ""
|
|
171
|
+
echo -e "${GRAY}(Auto-enabled when BMAD detected)${NC}"
|
|
172
|
+
fi
|
|
173
|
+
|
|
174
|
+
echo ""
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
#
|
|
178
|
+
# @function disable_party_mode
|
|
179
|
+
# @context Disable party mode voice integration (create opt-out flag)
|
|
180
|
+
#
|
|
181
|
+
disable_party_mode() {
|
|
182
|
+
mkdir -p "$PLUGIN_DIR"
|
|
183
|
+
|
|
184
|
+
if [[ -f "$DISABLE_FLAG" ]]; then
|
|
185
|
+
echo -e "${YELLOW}⚠️ Party mode voices already disabled${NC}"
|
|
186
|
+
return 0
|
|
187
|
+
fi
|
|
188
|
+
|
|
189
|
+
# Create opt-out flag
|
|
190
|
+
touch "$DISABLE_FLAG"
|
|
191
|
+
|
|
192
|
+
echo -e "${GREEN}✅ Party mode voices disabled${NC}"
|
|
193
|
+
echo ""
|
|
194
|
+
echo -e "${GRAY}Party mode will continue to work, but agents won't speak${NC}"
|
|
195
|
+
echo -e "${GRAY}Enable again with: /agent-vibes:bmad-party enable${NC}"
|
|
196
|
+
echo ""
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
# Main command dispatcher
|
|
200
|
+
case "${1:-status}" in
|
|
201
|
+
enable)
|
|
202
|
+
enable_party_mode
|
|
203
|
+
;;
|
|
204
|
+
disable)
|
|
205
|
+
disable_party_mode
|
|
206
|
+
;;
|
|
207
|
+
status)
|
|
208
|
+
show_status
|
|
209
|
+
;;
|
|
210
|
+
*)
|
|
211
|
+
echo -e "${CYAN}AgentVibes BMAD Party Mode Manager${NC}"
|
|
212
|
+
echo ""
|
|
213
|
+
echo "Usage: bmad-party-manager.sh {enable|disable|status}"
|
|
214
|
+
echo ""
|
|
215
|
+
echo "Commands:"
|
|
216
|
+
echo " enable Enable party mode voice integration"
|
|
217
|
+
echo " disable Disable party mode voice integration (opt-out)"
|
|
218
|
+
echo " status Show current status and configuration"
|
|
219
|
+
echo ""
|
|
220
|
+
echo "Party Mode Voice Integration:"
|
|
221
|
+
echo " • Auto-enabled when BMAD v6 detected"
|
|
222
|
+
echo " • Each agent speaks with unique voice during party mode"
|
|
223
|
+
echo " • Opt-out available via disable command"
|
|
224
|
+
;;
|
|
225
|
+
esac
|
|
File without changes
|
|
@@ -169,19 +169,12 @@ map_to_agent_id() {
|
|
|
169
169
|
|
|
170
170
|
AGENT_ID=$(map_to_agent_id "$AGENT_NAME_OR_ID")
|
|
171
171
|
|
|
172
|
-
#
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
PROFILE_MUSIC_VOLUME=""
|
|
179
|
-
PROFILE_MUSIC_ENABLED=""
|
|
180
|
-
|
|
181
|
-
if [[ -n "$AGENT_ID" ]] && [[ -f "$VOICE_MAP_FILE" ]]; then
|
|
182
|
-
# Single Node.js call for all fields — avoids ~900ms of per-call startup overhead
|
|
183
|
-
_ALL_FIELDS=$(read_agent_profile_all "$AGENT_ID")
|
|
184
|
-
IFS='|' read -r PROFILE_VOICE PROFILE_PRETEXT PROFILE_REVERB PROFILE_PERSONALITY PROFILE_MUSIC_TRACK PROFILE_MUSIC_VOLUME PROFILE_MUSIC_ENABLED <<< "$_ALL_FIELDS"
|
|
172
|
+
# Get agent's voice and intro text
|
|
173
|
+
AGENT_VOICE=""
|
|
174
|
+
AGENT_INTRO=""
|
|
175
|
+
if [[ -n "$AGENT_ID" ]] && [[ -f "$SCRIPT_DIR/bmad-voice-manager.sh" ]]; then
|
|
176
|
+
AGENT_VOICE=$(cd "$PROJECT_ROOT" && "$SCRIPT_DIR/bmad-voice-manager.sh" get-voice "$AGENT_ID" 2>/dev/null)
|
|
177
|
+
AGENT_INTRO=$(cd "$PROJECT_ROOT" && "$SCRIPT_DIR/bmad-voice-manager.sh" get-intro "$AGENT_ID" 2>/dev/null)
|
|
185
178
|
fi
|
|
186
179
|
|
|
187
180
|
# Read global background music volume as fallback (stored as 0.0-1.0, convert to 0-100 integer)
|
|
File without changes
|
|
File without changes
|