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.
- package/.claude/commands/agent-vibes/bmad.md +203 -0
- package/.claude/github-star-reminder.txt +1 -0
- package/.claude/hooks/bmad-tts-injector.sh +333 -0
- package/.claude/hooks/bmad-voice-manager.sh +34 -0
- package/.claude/hooks/check-output-style.sh +2 -2
- package/.claude/hooks/github-star-reminder.sh +94 -0
- package/.claude/hooks/personality-manager.sh +2 -2
- package/.claude/hooks/piper-installer.sh +194 -0
- package/.claude/hooks/play-tts-elevenlabs.sh +30 -3
- package/.claude/hooks/play-tts-local-wrapper.sh +44 -0
- package/.claude/hooks/play-tts-piper.sh +10 -2
- package/.claude/hooks/play-tts-remote.sh +81 -0
- package/.claude/hooks/play-tts.sh +34 -0
- package/.claude/hooks/provider-commands.sh +30 -1
- package/.claude/hooks/voice-manager.sh +2 -2
- package/.claude/output-styles/agent-vibes.md +52 -36
- package/README.md +2 -2
- package/RELEASE_NOTES.md +412 -0
- package/agentvibes.org/.claude/commands/agent-vibes/add.md +21 -0
- package/agentvibes.org/.claude/commands/agent-vibes/agent-vibes.md +68 -0
- package/agentvibes.org/.claude/commands/agent-vibes/commands.json +53 -0
- package/agentvibes.org/.claude/commands/agent-vibes/get.md +9 -0
- package/agentvibes.org/.claude/commands/agent-vibes/list.md +13 -0
- package/agentvibes.org/.claude/commands/agent-vibes/personality.md +79 -0
- package/agentvibes.org/.claude/commands/agent-vibes/preview.md +16 -0
- package/agentvibes.org/.claude/commands/agent-vibes/provider.md +54 -0
- package/agentvibes.org/.claude/commands/agent-vibes/replay.md +19 -0
- package/agentvibes.org/.claude/commands/agent-vibes/sample.md +12 -0
- package/agentvibes.org/.claude/commands/agent-vibes/sentiment.md +52 -0
- package/agentvibes.org/.claude/commands/agent-vibes/set-language.md +47 -0
- package/agentvibes.org/.claude/commands/agent-vibes/set-pretext.md +65 -0
- package/agentvibes.org/.claude/commands/agent-vibes/switch.md +53 -0
- package/agentvibes.org/.claude/commands/agent-vibes/update.md +20 -0
- package/agentvibes.org/.claude/commands/agent-vibes/version.md +10 -0
- package/agentvibes.org/.claude/commands/agent-vibes/whoami.md +7 -0
- package/agentvibes.org/.claude/hooks/bmad-voice-manager.sh +278 -0
- package/agentvibes.org/.claude/hooks/language-manager.sh +190 -0
- package/agentvibes.org/.claude/hooks/personality-manager.sh +279 -0
- package/agentvibes.org/.claude/hooks/piper-download-voices.sh +133 -0
- package/agentvibes.org/.claude/hooks/piper-voice-manager.sh +227 -0
- package/agentvibes.org/.claude/hooks/play-tts-elevenlabs.sh +201 -0
- package/agentvibes.org/.claude/hooks/play-tts-piper.sh +175 -0
- package/agentvibes.org/.claude/hooks/play-tts.sh +138 -0
- package/agentvibes.org/.claude/hooks/provider-commands.sh +374 -0
- package/agentvibes.org/.claude/hooks/provider-manager.sh +196 -0
- package/agentvibes.org/.claude/hooks/sentiment-manager.sh +163 -0
- package/agentvibes.org/.claude/hooks/voice-manager.sh +349 -0
- package/agentvibes.org/.claude/hooks/voices-config.sh +33 -0
- package/agentvibes.org/.claude/journal/2025-10-07.html +373 -0
- package/agentvibes.org/.claude/journal/index.html +91 -0
- package/agentvibes.org/.claude/output-styles/agent-vibes.md +203 -0
- package/agentvibes.org/.claude/personalities/angry.md +16 -0
- package/agentvibes.org/.claude/personalities/annoying.md +16 -0
- package/agentvibes.org/.claude/personalities/crass.md +16 -0
- package/agentvibes.org/.claude/personalities/dramatic.md +16 -0
- package/agentvibes.org/.claude/personalities/dry-humor.md +52 -0
- package/agentvibes.org/.claude/personalities/flirty.md +22 -0
- package/agentvibes.org/.claude/personalities/funny.md +16 -0
- package/agentvibes.org/.claude/personalities/grandpa.md +34 -0
- package/agentvibes.org/.claude/personalities/millennial.md +16 -0
- package/agentvibes.org/.claude/personalities/moody.md +16 -0
- package/agentvibes.org/.claude/personalities/normal.md +18 -0
- package/agentvibes.org/.claude/personalities/pirate.md +16 -0
- package/agentvibes.org/.claude/personalities/poetic.md +16 -0
- package/agentvibes.org/.claude/personalities/professional.md +16 -0
- package/agentvibes.org/.claude/personalities/robot.md +16 -0
- package/agentvibes.org/.claude/personalities/sarcastic.md +40 -0
- package/agentvibes.org/.claude/personalities/sassy.md +16 -0
- package/agentvibes.org/.claude/personalities/surfer-dude.md +16 -0
- package/agentvibes.org/.claude/personalities/zen.md +16 -0
- package/agentvibes.org/.mcp-minimal.json +60 -0
- package/agentvibes.org/CHANGELOG.md +56 -0
- package/agentvibes.org/README.md +93 -0
- package/agentvibes.org/app/(auth)/layout.tsx +15 -0
- package/agentvibes.org/app/(auth)/reset-password/page.tsx +45 -0
- package/agentvibes.org/app/(auth)/signin/page.tsx +82 -0
- package/agentvibes.org/app/(auth)/signup/page.tsx +104 -0
- package/agentvibes.org/app/(default)/layout.tsx +31 -0
- package/agentvibes.org/app/(default)/page.tsx +20 -0
- package/agentvibes.org/app/api/hello/route.ts +3 -0
- package/agentvibes.org/app/css/additional-styles/theme.css +82 -0
- package/agentvibes.org/app/css/additional-styles/utility-patterns.css +55 -0
- package/agentvibes.org/app/css/style.css +100 -0
- package/agentvibes.org/app/layout.tsx +63 -0
- package/agentvibes.org/components/cta.tsx +58 -0
- package/agentvibes.org/components/features.tsx +256 -0
- package/agentvibes.org/components/hero-home.tsx +133 -0
- package/agentvibes.org/components/modal-video.tsx +137 -0
- package/agentvibes.org/components/page-illustration.tsx +55 -0
- package/agentvibes.org/components/spotlight.tsx +77 -0
- package/agentvibes.org/components/testimonials.tsx +282 -0
- package/agentvibes.org/components/ui/footer.tsx +82 -0
- package/agentvibes.org/components/ui/header.tsx +53 -0
- package/agentvibes.org/components/ui/logo.tsx +10 -0
- package/agentvibes.org/components/workflows.tsx +176 -0
- package/agentvibes.org/next.config.js +4 -0
- package/agentvibes.org/package-lock.json +1974 -0
- package/agentvibes.org/package.json +30 -0
- package/agentvibes.org/pnpm-lock.yaml +1141 -0
- package/agentvibes.org/postcss.config.js +5 -0
- package/agentvibes.org/public/audio/02-sarcastic.mp3 +0 -0
- package/agentvibes.org/public/audio/03-angry.mp3 +0 -0
- package/agentvibes.org/public/audio/04-grandpa.mp3 +0 -0
- package/agentvibes.org/public/audio/05-sarcastic-example2.mp3 +0 -0
- package/agentvibes.org/public/audio/french-rachel.mp3 +0 -0
- package/agentvibes.org/public/audio/spanish-antoni.mp3 +0 -0
- package/agentvibes.org/public/favicon.ico +0 -0
- package/agentvibes.org/public/fonts/nacelle-italic.woff2 +0 -0
- package/agentvibes.org/public/fonts/nacelle-regular.woff2 +0 -0
- package/agentvibes.org/public/fonts/nacelle-semibold.woff2 +0 -0
- package/agentvibes.org/public/fonts/nacelle-semibolditalic.woff2 +0 -0
- package/agentvibes.org/public/images/blurred-shape-gray.svg +1 -0
- package/agentvibes.org/public/images/blurred-shape.svg +1 -0
- package/agentvibes.org/public/images/client-logo-01.svg +1 -0
- package/agentvibes.org/public/images/client-logo-02.svg +1 -0
- package/agentvibes.org/public/images/client-logo-03.svg +1 -0
- package/agentvibes.org/public/images/client-logo-04.svg +1 -0
- package/agentvibes.org/public/images/client-logo-05.svg +1 -0
- package/agentvibes.org/public/images/client-logo-06.svg +1 -0
- package/agentvibes.org/public/images/client-logo-07.svg +1 -0
- package/agentvibes.org/public/images/client-logo-08.svg +1 -0
- package/agentvibes.org/public/images/client-logo-09.svg +1 -0
- package/agentvibes.org/public/images/features.png +0 -0
- package/agentvibes.org/public/images/footer-illustration.svg +1 -0
- package/agentvibes.org/public/images/hero-image-01.jpg +0 -0
- package/agentvibes.org/public/images/logo.svg +1 -0
- package/agentvibes.org/public/images/page-illustration.svg +1 -0
- package/agentvibes.org/public/images/secondary-illustration.svg +1 -0
- package/agentvibes.org/public/images/testimonial-01.jpg +0 -0
- package/agentvibes.org/public/images/testimonial-02.jpg +0 -0
- package/agentvibes.org/public/images/testimonial-03.jpg +0 -0
- package/agentvibes.org/public/images/testimonial-04.jpg +0 -0
- package/agentvibes.org/public/images/testimonial-05.jpg +0 -0
- package/agentvibes.org/public/images/testimonial-06.jpg +0 -0
- package/agentvibes.org/public/images/testimonial-07.jpg +0 -0
- package/agentvibes.org/public/images/testimonial-08.jpg +0 -0
- package/agentvibes.org/public/images/testimonial-09.jpg +0 -0
- package/agentvibes.org/public/images/workflow-01.png +0 -0
- package/agentvibes.org/public/images/workflow-02.png +0 -0
- package/agentvibes.org/public/images/workflow-03.png +0 -0
- package/agentvibes.org/public/videos/video.mp4 +0 -0
- package/agentvibes.org/tsconfig.json +28 -0
- package/agentvibes.org/utils/useMasonry.tsx +67 -0
- package/agentvibes.org/utils/useMousePosition.tsx +27 -0
- package/docs/REMOTE_TTS_SETUP.md +190 -0
- package/package.json +2 -2
- package/src/installer.js +193 -9
- package/test/helpers/test-helper.bash +4 -2
- package/test/unit/personality-manager.bats +16 -4
- package/test/unit/personality-voice-mapping.bats +15 -6
- package/test/unit/play-tts.bats +0 -9
- 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=$(
|
|
52
|
+
CURRENT_LANGUAGE=$(get_language_code)
|
|
53
53
|
|
|
54
54
|
# Get language code for API
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
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" |
|
|
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=$(
|
|
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
|
|
248
|
-
echo " /output-style
|
|
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
|
|
133
|
+
When a BMAD agent is active, AgentVibes will automatically detect and speak questions.
|
|
134
134
|
|
|
135
|
-
|
|
136
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
156
|
-
|
|
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
|
-
|
|
173
|
-
|
|
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
|
-
-
|
|
178
|
-
-
|
|
179
|
-
-
|
|
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
|
[](https://github.com/paulpreibisch/AgentVibes/actions/workflows/publish.yml)
|
|
12
12
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
13
13
|
|
|
14
|
-
**Author**: Paul Preibisch ([@997Fire](https://x.com/997Fire)) | **Version**: v2.0.
|
|
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.
|
|
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
|
|