agentvibes 2.0.9 → 2.0.12

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 (152) hide show
  1. package/.claude/commands/agent-vibes/bmad.md +203 -0
  2. package/.claude/github-star-reminder.txt +1 -0
  3. package/.claude/hooks/bmad-tts-injector.sh +333 -0
  4. package/.claude/hooks/bmad-voice-manager.sh +34 -0
  5. package/.claude/hooks/check-output-style.sh +2 -2
  6. package/.claude/hooks/github-star-reminder.sh +94 -0
  7. package/.claude/hooks/personality-manager.sh +2 -2
  8. package/.claude/hooks/piper-installer.sh +194 -0
  9. package/.claude/hooks/play-tts-elevenlabs.sh +30 -3
  10. package/.claude/hooks/play-tts-local-wrapper.sh +44 -0
  11. package/.claude/hooks/play-tts-piper.sh +10 -2
  12. package/.claude/hooks/play-tts-remote.sh +81 -0
  13. package/.claude/hooks/play-tts.sh +34 -0
  14. package/.claude/hooks/provider-commands.sh +30 -1
  15. package/.claude/hooks/voice-manager.sh +2 -2
  16. package/.claude/output-styles/agent-vibes.md +52 -36
  17. package/README.md +2 -2
  18. package/RELEASE_NOTES.md +412 -0
  19. package/agentvibes.org/.claude/commands/agent-vibes/add.md +21 -0
  20. package/agentvibes.org/.claude/commands/agent-vibes/agent-vibes.md +68 -0
  21. package/agentvibes.org/.claude/commands/agent-vibes/commands.json +53 -0
  22. package/agentvibes.org/.claude/commands/agent-vibes/get.md +9 -0
  23. package/agentvibes.org/.claude/commands/agent-vibes/list.md +13 -0
  24. package/agentvibes.org/.claude/commands/agent-vibes/personality.md +79 -0
  25. package/agentvibes.org/.claude/commands/agent-vibes/preview.md +16 -0
  26. package/agentvibes.org/.claude/commands/agent-vibes/provider.md +54 -0
  27. package/agentvibes.org/.claude/commands/agent-vibes/replay.md +19 -0
  28. package/agentvibes.org/.claude/commands/agent-vibes/sample.md +12 -0
  29. package/agentvibes.org/.claude/commands/agent-vibes/sentiment.md +52 -0
  30. package/agentvibes.org/.claude/commands/agent-vibes/set-language.md +47 -0
  31. package/agentvibes.org/.claude/commands/agent-vibes/set-pretext.md +65 -0
  32. package/agentvibes.org/.claude/commands/agent-vibes/switch.md +53 -0
  33. package/agentvibes.org/.claude/commands/agent-vibes/update.md +20 -0
  34. package/agentvibes.org/.claude/commands/agent-vibes/version.md +10 -0
  35. package/agentvibes.org/.claude/commands/agent-vibes/whoami.md +7 -0
  36. package/agentvibes.org/.claude/hooks/bmad-voice-manager.sh +278 -0
  37. package/agentvibes.org/.claude/hooks/language-manager.sh +190 -0
  38. package/agentvibes.org/.claude/hooks/personality-manager.sh +279 -0
  39. package/agentvibes.org/.claude/hooks/piper-download-voices.sh +133 -0
  40. package/agentvibes.org/.claude/hooks/piper-voice-manager.sh +227 -0
  41. package/agentvibes.org/.claude/hooks/play-tts-elevenlabs.sh +201 -0
  42. package/agentvibes.org/.claude/hooks/play-tts-piper.sh +175 -0
  43. package/agentvibes.org/.claude/hooks/play-tts.sh +138 -0
  44. package/agentvibes.org/.claude/hooks/provider-commands.sh +374 -0
  45. package/agentvibes.org/.claude/hooks/provider-manager.sh +196 -0
  46. package/agentvibes.org/.claude/hooks/sentiment-manager.sh +163 -0
  47. package/agentvibes.org/.claude/hooks/voice-manager.sh +349 -0
  48. package/agentvibes.org/.claude/hooks/voices-config.sh +33 -0
  49. package/agentvibes.org/.claude/journal/2025-10-07.html +373 -0
  50. package/agentvibes.org/.claude/journal/index.html +91 -0
  51. package/agentvibes.org/.claude/output-styles/agent-vibes.md +203 -0
  52. package/agentvibes.org/.claude/personalities/angry.md +16 -0
  53. package/agentvibes.org/.claude/personalities/annoying.md +16 -0
  54. package/agentvibes.org/.claude/personalities/crass.md +16 -0
  55. package/agentvibes.org/.claude/personalities/dramatic.md +16 -0
  56. package/agentvibes.org/.claude/personalities/dry-humor.md +52 -0
  57. package/agentvibes.org/.claude/personalities/flirty.md +22 -0
  58. package/agentvibes.org/.claude/personalities/funny.md +16 -0
  59. package/agentvibes.org/.claude/personalities/grandpa.md +34 -0
  60. package/agentvibes.org/.claude/personalities/millennial.md +16 -0
  61. package/agentvibes.org/.claude/personalities/moody.md +16 -0
  62. package/agentvibes.org/.claude/personalities/normal.md +18 -0
  63. package/agentvibes.org/.claude/personalities/pirate.md +16 -0
  64. package/agentvibes.org/.claude/personalities/poetic.md +16 -0
  65. package/agentvibes.org/.claude/personalities/professional.md +16 -0
  66. package/agentvibes.org/.claude/personalities/robot.md +16 -0
  67. package/agentvibes.org/.claude/personalities/sarcastic.md +40 -0
  68. package/agentvibes.org/.claude/personalities/sassy.md +16 -0
  69. package/agentvibes.org/.claude/personalities/surfer-dude.md +16 -0
  70. package/agentvibes.org/.claude/personalities/zen.md +16 -0
  71. package/agentvibes.org/.mcp-minimal.json +60 -0
  72. package/agentvibes.org/CHANGELOG.md +56 -0
  73. package/agentvibes.org/README.md +93 -0
  74. package/agentvibes.org/app/(auth)/layout.tsx +15 -0
  75. package/agentvibes.org/app/(auth)/reset-password/page.tsx +45 -0
  76. package/agentvibes.org/app/(auth)/signin/page.tsx +82 -0
  77. package/agentvibes.org/app/(auth)/signup/page.tsx +104 -0
  78. package/agentvibes.org/app/(default)/layout.tsx +31 -0
  79. package/agentvibes.org/app/(default)/page.tsx +20 -0
  80. package/agentvibes.org/app/api/hello/route.ts +3 -0
  81. package/agentvibes.org/app/css/additional-styles/theme.css +82 -0
  82. package/agentvibes.org/app/css/additional-styles/utility-patterns.css +55 -0
  83. package/agentvibes.org/app/css/style.css +100 -0
  84. package/agentvibes.org/app/layout.tsx +63 -0
  85. package/agentvibes.org/components/cta.tsx +58 -0
  86. package/agentvibes.org/components/features.tsx +256 -0
  87. package/agentvibes.org/components/hero-home.tsx +133 -0
  88. package/agentvibes.org/components/modal-video.tsx +137 -0
  89. package/agentvibes.org/components/page-illustration.tsx +55 -0
  90. package/agentvibes.org/components/spotlight.tsx +77 -0
  91. package/agentvibes.org/components/testimonials.tsx +282 -0
  92. package/agentvibes.org/components/ui/footer.tsx +82 -0
  93. package/agentvibes.org/components/ui/header.tsx +53 -0
  94. package/agentvibes.org/components/ui/logo.tsx +10 -0
  95. package/agentvibes.org/components/workflows.tsx +176 -0
  96. package/agentvibes.org/next.config.js +4 -0
  97. package/agentvibes.org/package-lock.json +1974 -0
  98. package/agentvibes.org/package.json +30 -0
  99. package/agentvibes.org/pnpm-lock.yaml +1141 -0
  100. package/agentvibes.org/postcss.config.js +5 -0
  101. package/agentvibes.org/public/audio/02-sarcastic.mp3 +0 -0
  102. package/agentvibes.org/public/audio/03-angry.mp3 +0 -0
  103. package/agentvibes.org/public/audio/04-grandpa.mp3 +0 -0
  104. package/agentvibes.org/public/audio/05-sarcastic-example2.mp3 +0 -0
  105. package/agentvibes.org/public/audio/french-rachel.mp3 +0 -0
  106. package/agentvibes.org/public/audio/spanish-antoni.mp3 +0 -0
  107. package/agentvibes.org/public/favicon.ico +0 -0
  108. package/agentvibes.org/public/fonts/nacelle-italic.woff2 +0 -0
  109. package/agentvibes.org/public/fonts/nacelle-regular.woff2 +0 -0
  110. package/agentvibes.org/public/fonts/nacelle-semibold.woff2 +0 -0
  111. package/agentvibes.org/public/fonts/nacelle-semibolditalic.woff2 +0 -0
  112. package/agentvibes.org/public/images/blurred-shape-gray.svg +1 -0
  113. package/agentvibes.org/public/images/blurred-shape.svg +1 -0
  114. package/agentvibes.org/public/images/client-logo-01.svg +1 -0
  115. package/agentvibes.org/public/images/client-logo-02.svg +1 -0
  116. package/agentvibes.org/public/images/client-logo-03.svg +1 -0
  117. package/agentvibes.org/public/images/client-logo-04.svg +1 -0
  118. package/agentvibes.org/public/images/client-logo-05.svg +1 -0
  119. package/agentvibes.org/public/images/client-logo-06.svg +1 -0
  120. package/agentvibes.org/public/images/client-logo-07.svg +1 -0
  121. package/agentvibes.org/public/images/client-logo-08.svg +1 -0
  122. package/agentvibes.org/public/images/client-logo-09.svg +1 -0
  123. package/agentvibes.org/public/images/features.png +0 -0
  124. package/agentvibes.org/public/images/footer-illustration.svg +1 -0
  125. package/agentvibes.org/public/images/hero-image-01.jpg +0 -0
  126. package/agentvibes.org/public/images/logo.svg +1 -0
  127. package/agentvibes.org/public/images/page-illustration.svg +1 -0
  128. package/agentvibes.org/public/images/secondary-illustration.svg +1 -0
  129. package/agentvibes.org/public/images/testimonial-01.jpg +0 -0
  130. package/agentvibes.org/public/images/testimonial-02.jpg +0 -0
  131. package/agentvibes.org/public/images/testimonial-03.jpg +0 -0
  132. package/agentvibes.org/public/images/testimonial-04.jpg +0 -0
  133. package/agentvibes.org/public/images/testimonial-05.jpg +0 -0
  134. package/agentvibes.org/public/images/testimonial-06.jpg +0 -0
  135. package/agentvibes.org/public/images/testimonial-07.jpg +0 -0
  136. package/agentvibes.org/public/images/testimonial-08.jpg +0 -0
  137. package/agentvibes.org/public/images/testimonial-09.jpg +0 -0
  138. package/agentvibes.org/public/images/workflow-01.png +0 -0
  139. package/agentvibes.org/public/images/workflow-02.png +0 -0
  140. package/agentvibes.org/public/images/workflow-03.png +0 -0
  141. package/agentvibes.org/public/videos/video.mp4 +0 -0
  142. package/agentvibes.org/tsconfig.json +28 -0
  143. package/agentvibes.org/utils/useMasonry.tsx +67 -0
  144. package/agentvibes.org/utils/useMousePosition.tsx +27 -0
  145. package/docs/REMOTE_TTS_SETUP.md +190 -0
  146. package/package.json +2 -2
  147. package/src/installer.js +193 -9
  148. package/test/helpers/test-helper.bash +4 -2
  149. package/test/unit/personality-manager.bats +16 -4
  150. package/test/unit/personality-voice-mapping.bats +15 -6
  151. package/test/unit/play-tts.bats +0 -9
  152. package/.claude/commands/agent-vibes-bmad.md +0 -132
@@ -0,0 +1,194 @@
1
+ #!/bin/bash
2
+ #
3
+ # @fileoverview Piper TTS Installer
4
+ # @context Installs Piper TTS and downloads initial voice models
5
+ # @architecture Helper script for AgentVibes installer and manual installation
6
+ # @why Piper TTS requires separate installation from pipx/pip
7
+ #
8
+
9
+ set -e # Exit on error
10
+
11
+ echo "🎤 Piper TTS Installer"
12
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
13
+ echo ""
14
+
15
+ # Check if running on WSL or Linux
16
+ if ! grep -qi microsoft /proc/version 2>/dev/null && [[ "$(uname -s)" != "Linux" ]]; then
17
+ echo "❌ Piper TTS is only supported on WSL and Linux"
18
+ echo " Your platform: $(uname -s)"
19
+ echo ""
20
+ echo " For macOS/Windows, use ElevenLabs instead:"
21
+ echo " /agent-vibes:provider switch elevenlabs"
22
+ exit 1
23
+ fi
24
+
25
+ # Check if Piper is already installed
26
+ if command -v piper &> /dev/null; then
27
+ PIPER_VERSION=$(piper --version 2>&1 || echo "unknown")
28
+ echo "✅ Piper TTS is already installed!"
29
+ echo " Version: $PIPER_VERSION"
30
+ echo ""
31
+ echo " Download voices with: .claude/hooks/piper-download-voices.sh"
32
+ exit 0
33
+ fi
34
+
35
+ echo "📦 Installing Piper TTS..."
36
+ echo ""
37
+
38
+ # Check if pipx is installed
39
+ if ! command -v pipx &> /dev/null; then
40
+ echo "⚠️ pipx not found. Installing pipx first..."
41
+ echo ""
42
+
43
+ # Try to install pipx
44
+ if command -v apt-get &> /dev/null; then
45
+ # Debian/Ubuntu
46
+ sudo apt-get update
47
+ sudo apt-get install -y pipx
48
+ elif command -v brew &> /dev/null; then
49
+ # macOS (though Piper doesn't run on macOS)
50
+ brew install pipx
51
+ elif command -v dnf &> /dev/null; then
52
+ # Fedora
53
+ sudo dnf install -y pipx
54
+ elif command -v pacman &> /dev/null; then
55
+ # Arch Linux
56
+ sudo pacman -S python-pipx
57
+ else
58
+ echo "❌ Unable to install pipx automatically."
59
+ echo ""
60
+ echo " Please install pipx manually:"
61
+ echo " https://pipx.pypa.io/stable/installation/"
62
+ exit 1
63
+ fi
64
+
65
+ # Ensure pipx is in PATH
66
+ pipx ensurepath
67
+ echo ""
68
+ fi
69
+
70
+ # Install Piper TTS
71
+ echo "📥 Installing Piper TTS via pipx..."
72
+ pipx install piper-tts || pipx install --force piper-tts
73
+
74
+ # Ensure pipx's bin directory is in PATH
75
+ echo ""
76
+ echo "🔧 Configuring PATH..."
77
+ pipx ensurepath
78
+
79
+ # Add pipx bin to current session PATH
80
+ PIPX_BIN_DIR="$HOME/.local/bin"
81
+ if [[ -d "$PIPX_BIN_DIR" ]]; then
82
+ export PATH="$PIPX_BIN_DIR:$PATH"
83
+ fi
84
+
85
+ # Check if piper is available now
86
+ if ! command -v piper &> /dev/null; then
87
+ # Try to find piper in the pipx installation directory
88
+ if [[ -f "$PIPX_BIN_DIR/piper" ]]; then
89
+ echo "✅ Piper installed at: $PIPX_BIN_DIR/piper"
90
+
91
+ # Update shell configuration files
92
+ SHELL_CONFIG=""
93
+ if [[ -f "$HOME/.bashrc" ]]; then
94
+ SHELL_CONFIG="$HOME/.bashrc"
95
+ elif [[ -f "$HOME/.zshrc" ]]; then
96
+ SHELL_CONFIG="$HOME/.zshrc"
97
+ fi
98
+
99
+ if [[ -n "$SHELL_CONFIG" ]]; then
100
+ # Check if PATH update already exists
101
+ if ! grep -q "export PATH=\"\$HOME/.local/bin:\$PATH\"" "$SHELL_CONFIG"; then
102
+ echo "" >> "$SHELL_CONFIG"
103
+ echo "# Added by AgentVibes Piper installer" >> "$SHELL_CONFIG"
104
+ echo "export PATH=\"\$HOME/.local/bin:\$PATH\"" >> "$SHELL_CONFIG"
105
+ echo "✅ Updated $SHELL_CONFIG with PATH configuration"
106
+ fi
107
+ fi
108
+
109
+ # Make piper available in current session
110
+ export PATH="$PIPX_BIN_DIR:$PATH"
111
+
112
+ # Verify it's working
113
+ if "$PIPX_BIN_DIR/piper" --version &> /dev/null; then
114
+ echo "✅ Piper is working! You may need to restart your terminal or run:"
115
+ echo " export PATH=\"\$HOME/.local/bin:\$PATH\""
116
+ else
117
+ echo "❌ Piper installed but not executing properly"
118
+ echo " Please restart your terminal and try again"
119
+ exit 1
120
+ fi
121
+ else
122
+ echo ""
123
+ echo "❌ Installation completed but piper command not found"
124
+ echo ""
125
+ echo " Try these steps:"
126
+ echo " 1. Run: pipx ensurepath"
127
+ echo " 2. Restart your terminal"
128
+ echo " 3. Run: export PATH=\"\$HOME/.local/bin:\$PATH\""
129
+ exit 1
130
+ fi
131
+ fi
132
+
133
+ echo ""
134
+ echo "✅ Piper TTS installed successfully!"
135
+ echo ""
136
+
137
+ PIPER_VERSION=$(piper --version 2>&1 || echo "unknown")
138
+ echo " Version: $PIPER_VERSION"
139
+ echo ""
140
+
141
+ # Determine voices directory
142
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
143
+ CLAUDE_DIR="$(dirname "$SCRIPT_DIR")"
144
+
145
+ # Check for configured voices directory
146
+ VOICES_DIR=""
147
+ if [[ -f "$CLAUDE_DIR/piper-voices-dir.txt" ]]; then
148
+ VOICES_DIR=$(cat "$CLAUDE_DIR/piper-voices-dir.txt")
149
+ elif [[ -f "$HOME/.claude/piper-voices-dir.txt" ]]; then
150
+ VOICES_DIR=$(cat "$HOME/.claude/piper-voices-dir.txt")
151
+ else
152
+ VOICES_DIR="$HOME/.claude/piper-voices"
153
+ fi
154
+
155
+ echo "📁 Voice storage location: $VOICES_DIR"
156
+ echo ""
157
+
158
+ # Ask if user wants to download voices now
159
+ read -p "Would you like to download voice models now? [Y/n] " -n 1 -r
160
+ echo ""
161
+
162
+ if [[ $REPLY =~ ^[Yy]$ ]] || [[ -z $REPLY ]]; then
163
+ echo ""
164
+ echo "📥 Downloading recommended voices..."
165
+ echo ""
166
+
167
+ # Use the piper-download-voices.sh script if available
168
+ if [[ -f "$SCRIPT_DIR/piper-download-voices.sh" ]]; then
169
+ "$SCRIPT_DIR/piper-download-voices.sh"
170
+ else
171
+ # Manual download of a basic voice
172
+ mkdir -p "$VOICES_DIR"
173
+
174
+ echo "Downloading en_US-lessac-medium (recommended)..."
175
+ curl -L "https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/lessac/medium/en_US-lessac-medium.onnx" \
176
+ -o "$VOICES_DIR/en_US-lessac-medium.onnx"
177
+ curl -L "https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/lessac/medium/en_US-lessac-medium.onnx.json" \
178
+ -o "$VOICES_DIR/en_US-lessac-medium.onnx.json"
179
+
180
+ echo "✅ Voice downloaded!"
181
+ fi
182
+ fi
183
+
184
+ echo ""
185
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
186
+ echo "🎉 Piper TTS Setup Complete!"
187
+ echo ""
188
+ echo "Next steps:"
189
+ echo " 1. Download more voices: .claude/hooks/piper-download-voices.sh"
190
+ echo " 2. List available voices: /agent-vibes:list"
191
+ echo " 3. Test it out: /agent-vibes:preview"
192
+ echo ""
193
+ echo "Enjoy your free, offline TTS! 🎤"
194
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
@@ -49,11 +49,38 @@ VOICE_ID=""
49
49
  LANGUAGE_CODE="en" # Default to English
50
50
 
51
51
  # Get current language setting
52
- CURRENT_LANGUAGE=$(get_current_language)
52
+ CURRENT_LANGUAGE=$(get_language_code)
53
53
 
54
54
  # Get language code for API
55
- LANGUAGE_CODE=$(get_language_code_for_name "$CURRENT_LANGUAGE")
56
- [[ -z "$LANGUAGE_CODE" ]] && LANGUAGE_CODE="en"
55
+ # ElevenLabs uses 2-letter ISO codes
56
+ case "$CURRENT_LANGUAGE" in
57
+ spanish) LANGUAGE_CODE="es" ;;
58
+ french) LANGUAGE_CODE="fr" ;;
59
+ german) LANGUAGE_CODE="de" ;;
60
+ italian) LANGUAGE_CODE="it" ;;
61
+ portuguese) LANGUAGE_CODE="pt" ;;
62
+ chinese) LANGUAGE_CODE="zh" ;;
63
+ japanese) LANGUAGE_CODE="ja" ;;
64
+ korean) LANGUAGE_CODE="ko" ;;
65
+ russian) LANGUAGE_CODE="ru" ;;
66
+ polish) LANGUAGE_CODE="pl" ;;
67
+ dutch) LANGUAGE_CODE="nl" ;;
68
+ turkish) LANGUAGE_CODE="tr" ;;
69
+ arabic) LANGUAGE_CODE="ar" ;;
70
+ hindi) LANGUAGE_CODE="hi" ;;
71
+ swedish) LANGUAGE_CODE="sv" ;;
72
+ danish) LANGUAGE_CODE="da" ;;
73
+ norwegian) LANGUAGE_CODE="no" ;;
74
+ finnish) LANGUAGE_CODE="fi" ;;
75
+ czech) LANGUAGE_CODE="cs" ;;
76
+ romanian) LANGUAGE_CODE="ro" ;;
77
+ ukrainian) LANGUAGE_CODE="uk" ;;
78
+ greek) LANGUAGE_CODE="el" ;;
79
+ bulgarian) LANGUAGE_CODE="bg" ;;
80
+ croatian) LANGUAGE_CODE="hr" ;;
81
+ slovak) LANGUAGE_CODE="sk" ;;
82
+ english|*) LANGUAGE_CODE="en" ;;
83
+ esac
57
84
 
58
85
  if [[ -n "$VOICE_OVERRIDE" ]]; then
59
86
  # Check if override is a voice name (lookup in mapping)
@@ -0,0 +1,44 @@
1
+ #!/bin/bash
2
+
3
+ # Local TTS Wrapper for AgentVibes
4
+ # This script runs on your local Windows WSL and receives audio from remote server
5
+ # Usage: ./play-tts-local-wrapper.sh "Text to speak"
6
+
7
+ # Configuration
8
+ REMOTE_HOST="${AGENTVIBES_REMOTE_HOST:-ubuntu-rdp}"
9
+ REMOTE_SCRIPT=".claude/hooks/play-tts-remote.sh"
10
+
11
+ # Get text from arguments or stdin
12
+ if [ $# -gt 0 ]; then
13
+ TEXT="$*"
14
+ else
15
+ TEXT=$(cat)
16
+ fi
17
+
18
+ # Function to play audio based on what's available
19
+ play_audio() {
20
+ # Try paplay first (WSLg PulseAudio)
21
+ if command -v paplay &> /dev/null; then
22
+ paplay --format=s16le --channels=1 --rate=22050
23
+ # Try aplay next
24
+ elif command -v aplay &> /dev/null; then
25
+ aplay -f S16_LE -c 1 -r 22050
26
+ # Try PowerShell audio playback as last resort
27
+ elif command -v powershell.exe &> /dev/null; then
28
+ # Save to temp file and play with Windows Media Player
29
+ TEMP_FILE="/tmp/tts_audio_$$.wav"
30
+ cat > "$TEMP_FILE"
31
+ powershell.exe -Command "& {(New-Object Media.SoundPlayer '$TEMP_FILE').PlaySync()}" 2>/dev/null
32
+ rm -f "$TEMP_FILE"
33
+ else
34
+ echo "Error: No audio playback method available" >&2
35
+ exit 1
36
+ fi
37
+ }
38
+
39
+ # SSH to remote, generate TTS, and pipe back for local playback
40
+ echo "$TEXT" | ssh "$REMOTE_HOST" "bash $REMOTE_SCRIPT" | play_audio
41
+
42
+ # Alternative method if you want to save the audio file
43
+ # echo "$TEXT" | ssh "$REMOTE_HOST" "bash $REMOTE_SCRIPT" > /tmp/tts_output.wav
44
+ # paplay /tmp/tts_output.wav
@@ -79,7 +79,15 @@ if [[ -z "$TEXT" ]]; then
79
79
  fi
80
80
 
81
81
  # Check if Piper is installed
82
- if ! command -v piper &> /dev/null; then
82
+ PIPER_CMD=""
83
+ if command -v piper &> /dev/null; then
84
+ PIPER_CMD="piper"
85
+ elif [[ -x "$HOME/.local/bin/piper" ]]; then
86
+ # Check pipx installation directory
87
+ PIPER_CMD="$HOME/.local/bin/piper"
88
+ echo "⚠️ Using Piper from: $PIPER_CMD"
89
+ echo " Add to PATH: export PATH=\"\$HOME/.local/bin:\$PATH\""
90
+ else
83
91
  echo "❌ Error: Piper TTS not installed"
84
92
  echo "Install with: pipx install piper-tts"
85
93
  echo "Or run: .claude/hooks/piper-installer.sh"
@@ -152,7 +160,7 @@ TEMP_FILE="$AUDIO_DIR/tts-$(date +%s).wav"
152
160
  # @exitcode 0=success, 4=synthesis error
153
161
  # @sideeffects Creates audio file
154
162
  # @edgecases Handles piper errors, invalid models
155
- echo "$TEXT" | piper --model "$VOICE_PATH" --output_file "$TEMP_FILE" 2>/dev/null
163
+ echo "$TEXT" | "$PIPER_CMD" --model "$VOICE_PATH" --output_file "$TEMP_FILE" 2>/dev/null
156
164
 
157
165
  if [[ ! -f "$TEMP_FILE" ]] || [[ ! -s "$TEMP_FILE" ]]; then
158
166
  echo "❌ Failed to synthesize speech with Piper"
@@ -0,0 +1,81 @@
1
+ #!/bin/bash
2
+
3
+ # Remote TTS Generator for AgentVibes
4
+ # This script generates TTS on the remote server and outputs audio data
5
+ # that can be piped through SSH for local playback
6
+
7
+ # Default voice model
8
+ DEFAULT_MODEL="$HOME/.claude/piper-voices/en_US-lessac-medium.onnx"
9
+ DEFAULT_VOICE="Aria"
10
+
11
+ # Get text from arguments or stdin
12
+ if [ $# -gt 0 ]; then
13
+ TEXT="$*"
14
+ else
15
+ TEXT=$(cat)
16
+ fi
17
+
18
+ # Check if we're in an SSH session or force remote mode
19
+ if [ -n "$SSH_CONNECTION" ] || [ -n "$SSH_CLIENT" ] || [ "$FORCE_REMOTE_TTS" = "true" ]; then
20
+ # We're on a remote server or forcing remote mode
21
+
22
+ # Check for piper
23
+ if command -v piper &> /dev/null; then
24
+ PIPER_CMD="piper"
25
+ elif [ -f "$HOME/.local/share/pipx/venvs/piper-tts/bin/piper" ]; then
26
+ PIPER_CMD="$HOME/.local/share/pipx/venvs/piper-tts/bin/piper"
27
+ elif [ -f "$HOME/bin/piper" ]; then
28
+ PIPER_CMD="$HOME/bin/piper"
29
+ else
30
+ # Fallback to espeak-ng if available
31
+ if command -v espeak-ng &> /dev/null; then
32
+ echo "$TEXT" | espeak-ng --stdout
33
+ exit 0
34
+ else
35
+ echo "Error: No TTS engine found (piper or espeak-ng)" >&2
36
+ exit 1
37
+ fi
38
+ fi
39
+
40
+ # Check for voice model
41
+ if [ -f "$DEFAULT_MODEL" ]; then
42
+ MODEL="$DEFAULT_MODEL"
43
+ elif [ -f "$HOME/.local/share/piper/voices/en_US-lessac-medium.onnx" ]; then
44
+ MODEL="$HOME/.local/share/piper/voices/en_US-lessac-medium.onnx"
45
+ else
46
+ echo "Error: No voice model found" >&2
47
+ exit 1
48
+ fi
49
+
50
+ # Generate TTS and output raw audio to stdout
51
+ echo "$TEXT" | "$PIPER_CMD" -m "$MODEL" -f - 2>/dev/null
52
+
53
+ else
54
+ # We're running locally in WSL - still generate TTS for testing
55
+ # Check for piper in WSL
56
+ if [ -f "$HOME/.local/share/pipx/venvs/piper-tts/bin/piper" ]; then
57
+ PIPER_CMD="$HOME/.local/share/pipx/venvs/piper-tts/bin/piper"
58
+ elif [ -f "$HOME/bin/piper" ]; then
59
+ PIPER_CMD="$HOME/bin/piper"
60
+ elif command -v pipx &> /dev/null; then
61
+ # Try using pipx run as fallback
62
+ echo "$TEXT" | pipx run piper-tts -m "$DEFAULT_MODEL" -f - 2>/dev/null
63
+ exit 0
64
+ else
65
+ echo "Error: No TTS engine found in local WSL" >&2
66
+ exit 1
67
+ fi
68
+
69
+ # Check for voice model
70
+ if [ -f "$DEFAULT_MODEL" ]; then
71
+ MODEL="$DEFAULT_MODEL"
72
+ elif [ -f "$HOME/.local/share/piper/voices/en_US-lessac-medium.onnx" ]; then
73
+ MODEL="$HOME/.local/share/piper/voices/en_US-lessac-medium.onnx"
74
+ else
75
+ echo "Error: No voice model found" >&2
76
+ exit 1
77
+ fi
78
+
79
+ # Generate TTS and output raw audio to stdout
80
+ echo "$TEXT" | "$PIPER_CMD" -m "$MODEL" -f - 2>/dev/null
81
+ fi
@@ -18,12 +18,46 @@ VOICE_OVERRIDE="$2" # Optional: voice name or ID
18
18
  # Get script directory
19
19
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
20
20
 
21
+ # Check if we're in an SSH session and should use remote TTS
22
+ if [ -n "$SSH_CONNECTION" ] || [ -n "$SSH_CLIENT" ]; then
23
+ # Check if remote TTS forwarding is enabled
24
+ if [ -f "$HOME/.claude/tts-remote-forward" ] || [ "$AGENTVIBES_REMOTE_TTS" = "true" ]; then
25
+ # In SSH session with forwarding enabled - generate locally but don't play
26
+ # The audio data should be captured and sent to the client
27
+
28
+ # Source provider manager to get active provider
29
+ source "$SCRIPT_DIR/provider-manager.sh"
30
+ ACTIVE_PROVIDER=$(get_active_provider)
31
+
32
+ case "$ACTIVE_PROVIDER" in
33
+ piper)
34
+ # Generate audio and output to stdout for SSH forwarding
35
+ exec "$SCRIPT_DIR/play-tts-remote.sh" "$TEXT"
36
+ ;;
37
+ elevenlabs)
38
+ # For ElevenLabs, we might need a different approach
39
+ # since it requires API calls
40
+ exec "$SCRIPT_DIR/play-tts-elevenlabs.sh" "$TEXT" "$VOICE_OVERRIDE"
41
+ ;;
42
+ *)
43
+ echo "❌ Unknown provider: $ACTIVE_PROVIDER" >&2
44
+ exit 1
45
+ ;;
46
+ esac
47
+ exit 0
48
+ fi
49
+ fi
50
+
51
+ # Normal local playback path
21
52
  # Source provider manager to get active provider
22
53
  source "$SCRIPT_DIR/provider-manager.sh"
23
54
 
24
55
  # Get active provider
25
56
  ACTIVE_PROVIDER=$(get_active_provider)
26
57
 
58
+ # Show GitHub star reminder (once per day)
59
+ "$SCRIPT_DIR/github-star-reminder.sh" 2>/dev/null || true
60
+
27
61
  # Route to appropriate provider implementation
28
62
  case "$ACTIVE_PROVIDER" in
29
63
  elevenlabs)
@@ -12,6 +12,35 @@ source "$SCRIPT_DIR/language-manager.sh"
12
12
 
13
13
  COMMAND="${1:-help}"
14
14
 
15
+ # @function is_language_supported
16
+ # @intent Check if a language is supported by a provider
17
+ # @param $1 {string} language - Language code (e.g., "spanish", "french")
18
+ # @param $2 {string} provider - Provider name (e.g., "elevenlabs", "piper")
19
+ # @returns 0 if supported, 1 if not
20
+ is_language_supported() {
21
+ local language="$1"
22
+ local provider="$2"
23
+
24
+ # English is always supported
25
+ if [[ "$language" == "english" ]] || [[ "$language" == "en" ]]; then
26
+ return 0
27
+ fi
28
+
29
+ case "$provider" in
30
+ elevenlabs)
31
+ # ElevenLabs supports all languages via multilingual voices
32
+ return 0
33
+ ;;
34
+ piper)
35
+ # Piper only supports English natively
36
+ return 1
37
+ ;;
38
+ *)
39
+ return 1
40
+ ;;
41
+ esac
42
+ }
43
+
15
44
  # @function provider_list
16
45
  # @intent Display all available providers with status
17
46
  provider_list() {
@@ -99,7 +128,7 @@ provider_switch() {
99
128
 
100
129
  # Check language compatibility
101
130
  local current_language
102
- current_language=$(get_current_language)
131
+ current_language=$(get_language_code)
103
132
 
104
133
  if [[ "$current_language" != "english" ]]; then
105
134
  if ! is_language_supported "$current_language" "$new_provider" 2>/dev/null; then
@@ -244,8 +244,8 @@ case "$1" in
244
244
  fi
245
245
 
246
246
  echo ""
247
- echo "💡 Tip: To hear automatic TTS narration, enable the agent-vibes output style:"
248
- echo " /output-style agent-vibes"
247
+ echo "💡 Tip: To hear automatic TTS narration, enable the Agent Vibes output style:"
248
+ echo " /output-style Agent Vibes"
249
249
  fi
250
250
  ;;
251
251
 
@@ -128,55 +128,71 @@ You: "✅ That bug be walkin' the plank now, arr!"
128
128
 
129
129
  ## BMAD Plugin Integration
130
130
 
131
- **Automatic voice switching for BMAD agents:**
131
+ **Automatic voice switching and question detection for BMAD agents:**
132
132
 
133
- When a BMAD agent is activated (e.g., `/BMad:agents:pm`), AgentVibes will automatically:
133
+ When a BMAD agent is active, AgentVibes will automatically detect and speak questions.
134
134
 
135
- 1. **Detect BMAD agent from command/context**
136
- 2. **Check if BMAD plugin is enabled** (`.claude/plugins/bmad-voices-enabled.flag`)
135
+ ### Detection Method:
136
+ 1. **Check for `.bmad-agent-context` file** - Contains agent ID if BMAD agent is active
137
+ 2. **Check if BMAD plugin is enabled** - `.claude/plugins/bmad-voices-enabled.flag` exists
137
138
  3. **Look up voice mapping** from `.claude/plugins/bmad-voices.md`
138
- 4. **Apply agent's assigned voice** for all TTS acknowledgments/completions
139
- 5. **Apply agent's personality** from the mapping (if specified)
140
139
 
141
- **Implementation:**
142
- ```bash
143
- # At the start of acknowledgment/completion:
144
- # Try to detect BMAD agent ID from current context
145
- BMAD_AGENT_ID=""
140
+ ### MANDATORY BMAD QUESTION TTS PROTOCOL
146
141
 
147
- # Method 1: Check if we're in a BMAD agent command context
148
- if [[ -f ".bmad-agent-context" ]]; then
149
- BMAD_AGENT_ID=$(cat .bmad-agent-context 2>/dev/null)
150
- fi
142
+ **THIS IS A CRITICAL EXECUTION REQUIREMENT - NOT OPTIONAL**
151
143
 
152
- # Method 2: Parse from command history/context (fallback)
153
- # Note: This detection happens automatically when BMAD agent activates
144
+ When a BMAD agent is active, you MUST follow this EXACT protocol for EVERY response:
154
145
 
155
- # If BMAD agent detected and plugin enabled, use mapped voice
156
- if [[ -n "$BMAD_AGENT_ID" ]] && [[ -f ".claude/plugins/bmad-voices-enabled.flag" ]]; then
146
+ **STEP 1: Check BMAD Context (BEFORE drafting ANY response)**
147
+ ```bash
148
+ if [[ -f ".bmad-agent-context" ]] && [[ -f ".claude/plugins/bmad-voices-enabled.flag" ]]; then
149
+ BMAD_AGENT_ID=$(cat .bmad-agent-context 2>/dev/null)
157
150
  MAPPED_VOICE=$(.claude/hooks/bmad-voice-manager.sh get-voice "$BMAD_AGENT_ID")
158
- MAPPED_PERSONALITY=$(.claude/hooks/bmad-voice-manager.sh get-personality "$BMAD_AGENT_ID")
159
-
160
- if [[ -n "$MAPPED_VOICE" ]]; then
161
- # Use BMAD agent's mapped voice and personality
162
- if [[ -n "$MAPPED_PERSONALITY" ]] && [[ "$MAPPED_PERSONALITY" != "normal" ]]; then
163
- # Read personality instructions from .claude/personalities/${MAPPED_PERSONALITY}.md
164
- # Generate response in that personality style
165
- fi
166
- .claude/hooks/play-tts.sh "message" "$MAPPED_VOICE"
167
- # Exit early - don't use default personality system
168
- return
169
- fi
170
151
  fi
152
+ ```
153
+
154
+ **STEP 2: Draft Your Response**
155
+ - Write your complete response text (don't show to user yet)
156
+
157
+ **STEP 3: Scan for Questions (MANDATORY - DO NOT SKIP)**
158
+ If your response contains ANY of these:
159
+ - Question mark (?)
160
+ - Numbered list (1., 2., 3., etc.)
161
+ - Question phrases: "What would you like", "Should I", "Would you prefer", "Which option", "How should", "Do you want"
171
162
 
172
- # If no BMAD agent or plugin disabled, use standard personality/sentiment system
173
- # ... continue with normal sentiment/personality logic ...
163
+ Then IMMEDIATELY execute STEP 4 BEFORE showing response.
164
+
165
+ **STEP 4: Speak Questions via TTS (MANDATORY)**
166
+ ```bash
167
+ # Extract the question text and speak it
168
+ .claude/hooks/play-tts.sh "the actual question text" "$MAPPED_VOICE"
169
+ ```
170
+
171
+ **STEP 5: Show Response to User**
172
+ - Only NOW display the response text
173
+
174
+ **CRITICAL RULES:**
175
+ 1. This protocol is MANDATORY for EVERY BMAD agent response
176
+ 2. Steps 1-5 must execute in EXACT order
177
+ 3. You MUST use Bash tool to execute TTS in STEP 4
178
+ 4. NEVER skip STEP 3 scanning - it is required
179
+ 5. NEVER show response before speaking questions
180
+
181
+ **Example Execution:**
182
+ ```
183
+ User: "What should we do?"
184
+ [STEP 1: Check context - analyst agent active]
185
+ [STEP 2: Draft response: "What would you like to do next?\n\n1. Option A\n2. Option B"]
186
+ [STEP 3: Scan - FOUND question "What would you like to do next?" and numbered list]
187
+ [STEP 4: Execute Bash: .claude/hooks/play-tts.sh "What would you like to do next" "Ralf Eisend"]
188
+ [STEP 5: Show response to user]
174
189
  ```
175
190
 
176
191
  **BMAD Agent Context Tracking:**
177
- - When a BMAD agent activates, write agent ID to `.bmad-agent-context`
178
- - When agent exits, remove the file
179
- - This allows AgentVibes to know which BMAD agent is active
192
+ - Context file `.bmad-agent-context` contains agent ID when BMAD agent is active
193
+ - Created automatically by STEP 3.5a in activation-instructions
194
+ - Removed automatically when agent exits
195
+ - This allows AgentVibes to detect which BMAD agent is active
180
196
 
181
197
  **Voice Priority (in order):**
182
198
  1. BMAD plugin voice (if agent active and plugin enabled)
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**: v2.0.9
14
+ **Author**: Paul Preibisch ([@997Fire](https://x.com/997Fire)) | **Version**: v2.0.10
15
15
 
16
16
  ---
17
17
 
@@ -45,7 +45,7 @@
45
45
 
46
46
  ## 📰 Latest Release
47
47
 
48
- **[v2.0.0 - The Multi-Provider Revolution](https://github.com/paulpreibisch/AgentVibes/releases/tag/v2.0.9)** 🎉
48
+ **[v2.0.0 - The Multi-Provider Revolution](https://github.com/paulpreibisch/AgentVibes/releases/tag/v2.0.10)** 🎉
49
49
 
50
50
  The biggest update ever! **Multi-provider TTS support** (ElevenLabs + Piper TTS), **30+ languages**, expanded voice library (27+ voices), advanced sentiment system, enhanced BMAD integration, and comprehensive multilingual support. Choose between premium ElevenLabs voices or free offline Piper TTS!
51
51