agentvibes 2.0.12 → 2.0.14

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 (138) hide show
  1. package/.claude/commands/agent-vibes/bmad.md +0 -7
  2. package/.claude/github-star-reminder.txt +1 -1
  3. package/.claude/hooks/piper-installer.sh +7 -57
  4. package/.claude/hooks/play-tts-piper.sh +2 -10
  5. package/.claude/hooks/play-tts.sh +0 -31
  6. package/README.md +3 -3
  7. package/RELEASE_NOTES.md +44 -170
  8. package/package.json +1 -1
  9. package/src/installer.js +1 -112
  10. package/.claude/hooks/play-tts-local-wrapper.sh +0 -44
  11. package/.claude/hooks/play-tts-remote.sh +0 -81
  12. package/agentvibes.org/.claude/commands/agent-vibes/add.md +0 -21
  13. package/agentvibes.org/.claude/commands/agent-vibes/agent-vibes.md +0 -68
  14. package/agentvibes.org/.claude/commands/agent-vibes/commands.json +0 -53
  15. package/agentvibes.org/.claude/commands/agent-vibes/get.md +0 -9
  16. package/agentvibes.org/.claude/commands/agent-vibes/list.md +0 -13
  17. package/agentvibes.org/.claude/commands/agent-vibes/personality.md +0 -79
  18. package/agentvibes.org/.claude/commands/agent-vibes/preview.md +0 -16
  19. package/agentvibes.org/.claude/commands/agent-vibes/provider.md +0 -54
  20. package/agentvibes.org/.claude/commands/agent-vibes/replay.md +0 -19
  21. package/agentvibes.org/.claude/commands/agent-vibes/sample.md +0 -12
  22. package/agentvibes.org/.claude/commands/agent-vibes/sentiment.md +0 -52
  23. package/agentvibes.org/.claude/commands/agent-vibes/set-language.md +0 -47
  24. package/agentvibes.org/.claude/commands/agent-vibes/set-pretext.md +0 -65
  25. package/agentvibes.org/.claude/commands/agent-vibes/switch.md +0 -53
  26. package/agentvibes.org/.claude/commands/agent-vibes/update.md +0 -20
  27. package/agentvibes.org/.claude/commands/agent-vibes/version.md +0 -10
  28. package/agentvibes.org/.claude/commands/agent-vibes/whoami.md +0 -7
  29. package/agentvibes.org/.claude/hooks/bmad-voice-manager.sh +0 -278
  30. package/agentvibes.org/.claude/hooks/language-manager.sh +0 -190
  31. package/agentvibes.org/.claude/hooks/personality-manager.sh +0 -279
  32. package/agentvibes.org/.claude/hooks/piper-download-voices.sh +0 -133
  33. package/agentvibes.org/.claude/hooks/piper-voice-manager.sh +0 -227
  34. package/agentvibes.org/.claude/hooks/play-tts-elevenlabs.sh +0 -201
  35. package/agentvibes.org/.claude/hooks/play-tts-piper.sh +0 -175
  36. package/agentvibes.org/.claude/hooks/play-tts.sh +0 -138
  37. package/agentvibes.org/.claude/hooks/provider-commands.sh +0 -374
  38. package/agentvibes.org/.claude/hooks/provider-manager.sh +0 -196
  39. package/agentvibes.org/.claude/hooks/sentiment-manager.sh +0 -163
  40. package/agentvibes.org/.claude/hooks/voice-manager.sh +0 -349
  41. package/agentvibes.org/.claude/hooks/voices-config.sh +0 -33
  42. package/agentvibes.org/.claude/journal/2025-10-07.html +0 -373
  43. package/agentvibes.org/.claude/journal/index.html +0 -91
  44. package/agentvibes.org/.claude/output-styles/agent-vibes.md +0 -203
  45. package/agentvibes.org/.claude/personalities/angry.md +0 -16
  46. package/agentvibes.org/.claude/personalities/annoying.md +0 -16
  47. package/agentvibes.org/.claude/personalities/crass.md +0 -16
  48. package/agentvibes.org/.claude/personalities/dramatic.md +0 -16
  49. package/agentvibes.org/.claude/personalities/dry-humor.md +0 -52
  50. package/agentvibes.org/.claude/personalities/flirty.md +0 -22
  51. package/agentvibes.org/.claude/personalities/funny.md +0 -16
  52. package/agentvibes.org/.claude/personalities/grandpa.md +0 -34
  53. package/agentvibes.org/.claude/personalities/millennial.md +0 -16
  54. package/agentvibes.org/.claude/personalities/moody.md +0 -16
  55. package/agentvibes.org/.claude/personalities/normal.md +0 -18
  56. package/agentvibes.org/.claude/personalities/pirate.md +0 -16
  57. package/agentvibes.org/.claude/personalities/poetic.md +0 -16
  58. package/agentvibes.org/.claude/personalities/professional.md +0 -16
  59. package/agentvibes.org/.claude/personalities/robot.md +0 -16
  60. package/agentvibes.org/.claude/personalities/sarcastic.md +0 -40
  61. package/agentvibes.org/.claude/personalities/sassy.md +0 -16
  62. package/agentvibes.org/.claude/personalities/surfer-dude.md +0 -16
  63. package/agentvibes.org/.claude/personalities/zen.md +0 -16
  64. package/agentvibes.org/.mcp-minimal.json +0 -60
  65. package/agentvibes.org/CHANGELOG.md +0 -56
  66. package/agentvibes.org/README.md +0 -93
  67. package/agentvibes.org/app/(auth)/layout.tsx +0 -15
  68. package/agentvibes.org/app/(auth)/reset-password/page.tsx +0 -45
  69. package/agentvibes.org/app/(auth)/signin/page.tsx +0 -82
  70. package/agentvibes.org/app/(auth)/signup/page.tsx +0 -104
  71. package/agentvibes.org/app/(default)/layout.tsx +0 -31
  72. package/agentvibes.org/app/(default)/page.tsx +0 -20
  73. package/agentvibes.org/app/api/hello/route.ts +0 -3
  74. package/agentvibes.org/app/css/additional-styles/theme.css +0 -82
  75. package/agentvibes.org/app/css/additional-styles/utility-patterns.css +0 -55
  76. package/agentvibes.org/app/css/style.css +0 -100
  77. package/agentvibes.org/app/layout.tsx +0 -63
  78. package/agentvibes.org/components/cta.tsx +0 -58
  79. package/agentvibes.org/components/features.tsx +0 -256
  80. package/agentvibes.org/components/hero-home.tsx +0 -133
  81. package/agentvibes.org/components/modal-video.tsx +0 -137
  82. package/agentvibes.org/components/page-illustration.tsx +0 -55
  83. package/agentvibes.org/components/spotlight.tsx +0 -77
  84. package/agentvibes.org/components/testimonials.tsx +0 -282
  85. package/agentvibes.org/components/ui/footer.tsx +0 -82
  86. package/agentvibes.org/components/ui/header.tsx +0 -53
  87. package/agentvibes.org/components/ui/logo.tsx +0 -10
  88. package/agentvibes.org/components/workflows.tsx +0 -176
  89. package/agentvibes.org/next.config.js +0 -4
  90. package/agentvibes.org/package-lock.json +0 -1974
  91. package/agentvibes.org/package.json +0 -30
  92. package/agentvibes.org/pnpm-lock.yaml +0 -1141
  93. package/agentvibes.org/postcss.config.js +0 -5
  94. package/agentvibes.org/public/audio/02-sarcastic.mp3 +0 -0
  95. package/agentvibes.org/public/audio/03-angry.mp3 +0 -0
  96. package/agentvibes.org/public/audio/04-grandpa.mp3 +0 -0
  97. package/agentvibes.org/public/audio/05-sarcastic-example2.mp3 +0 -0
  98. package/agentvibes.org/public/audio/french-rachel.mp3 +0 -0
  99. package/agentvibes.org/public/audio/spanish-antoni.mp3 +0 -0
  100. package/agentvibes.org/public/favicon.ico +0 -0
  101. package/agentvibes.org/public/fonts/nacelle-italic.woff2 +0 -0
  102. package/agentvibes.org/public/fonts/nacelle-regular.woff2 +0 -0
  103. package/agentvibes.org/public/fonts/nacelle-semibold.woff2 +0 -0
  104. package/agentvibes.org/public/fonts/nacelle-semibolditalic.woff2 +0 -0
  105. package/agentvibes.org/public/images/blurred-shape-gray.svg +0 -1
  106. package/agentvibes.org/public/images/blurred-shape.svg +0 -1
  107. package/agentvibes.org/public/images/client-logo-01.svg +0 -1
  108. package/agentvibes.org/public/images/client-logo-02.svg +0 -1
  109. package/agentvibes.org/public/images/client-logo-03.svg +0 -1
  110. package/agentvibes.org/public/images/client-logo-04.svg +0 -1
  111. package/agentvibes.org/public/images/client-logo-05.svg +0 -1
  112. package/agentvibes.org/public/images/client-logo-06.svg +0 -1
  113. package/agentvibes.org/public/images/client-logo-07.svg +0 -1
  114. package/agentvibes.org/public/images/client-logo-08.svg +0 -1
  115. package/agentvibes.org/public/images/client-logo-09.svg +0 -1
  116. package/agentvibes.org/public/images/features.png +0 -0
  117. package/agentvibes.org/public/images/footer-illustration.svg +0 -1
  118. package/agentvibes.org/public/images/hero-image-01.jpg +0 -0
  119. package/agentvibes.org/public/images/logo.svg +0 -1
  120. package/agentvibes.org/public/images/page-illustration.svg +0 -1
  121. package/agentvibes.org/public/images/secondary-illustration.svg +0 -1
  122. package/agentvibes.org/public/images/testimonial-01.jpg +0 -0
  123. package/agentvibes.org/public/images/testimonial-02.jpg +0 -0
  124. package/agentvibes.org/public/images/testimonial-03.jpg +0 -0
  125. package/agentvibes.org/public/images/testimonial-04.jpg +0 -0
  126. package/agentvibes.org/public/images/testimonial-05.jpg +0 -0
  127. package/agentvibes.org/public/images/testimonial-06.jpg +0 -0
  128. package/agentvibes.org/public/images/testimonial-07.jpg +0 -0
  129. package/agentvibes.org/public/images/testimonial-08.jpg +0 -0
  130. package/agentvibes.org/public/images/testimonial-09.jpg +0 -0
  131. package/agentvibes.org/public/images/workflow-01.png +0 -0
  132. package/agentvibes.org/public/images/workflow-02.png +0 -0
  133. package/agentvibes.org/public/images/workflow-03.png +0 -0
  134. package/agentvibes.org/public/videos/video.mp4 +0 -0
  135. package/agentvibes.org/tsconfig.json +0 -28
  136. package/agentvibes.org/utils/useMasonry.tsx +0 -67
  137. package/agentvibes.org/utils/useMousePosition.tsx +0 -27
  138. package/docs/REMOTE_TTS_SETUP.md +0 -190
@@ -1,7 +0,0 @@
1
- ---
2
- description: Show the current active voice
3
- ---
4
-
5
- Display the currently selected ElevenLabs TTS voice.
6
-
7
- !bash .claude/hooks/voice-manager.sh whoami
@@ -1,278 +0,0 @@
1
- #!/bin/bash
2
-
3
- PLUGIN_DIR=".claude/plugins"
4
- PLUGIN_FILE="$PLUGIN_DIR/bmad-voices.md"
5
- ENABLED_FLAG="$PLUGIN_DIR/bmad-voices-enabled.flag"
6
-
7
- # Auto-enable plugin if BMAD is detected
8
- auto_enable_if_bmad_detected() {
9
- # Check if BMAD is installed
10
- if [[ -f ".bmad-core/install-manifest.yaml" ]] && [[ ! -f "$ENABLED_FLAG" ]]; then
11
- # BMAD detected but plugin not enabled - enable it silently
12
- mkdir -p "$PLUGIN_DIR"
13
- touch "$ENABLED_FLAG"
14
- return 0
15
- fi
16
- return 1
17
- }
18
-
19
- # Parse markdown table to get voice mapping
20
- get_agent_voice() {
21
- local agent_id="$1"
22
-
23
- # Auto-enable if BMAD is detected
24
- auto_enable_if_bmad_detected
25
-
26
- if [[ ! -f "$ENABLED_FLAG" ]]; then
27
- echo "" # Plugin disabled
28
- return
29
- fi
30
-
31
- if [[ ! -f "$PLUGIN_FILE" ]]; then
32
- echo "" # Plugin file missing
33
- return
34
- fi
35
-
36
- # Extract voice from markdown table
37
- local voice=$(grep "^| $agent_id " "$PLUGIN_FILE" | \
38
- awk -F'|' '{print $4}' | \
39
- sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
40
-
41
- echo "$voice"
42
- }
43
-
44
- # Get personality for agent
45
- get_agent_personality() {
46
- local agent_id="$1"
47
-
48
- if [[ ! -f "$PLUGIN_FILE" ]]; then
49
- echo ""
50
- return
51
- fi
52
-
53
- local personality=$(grep "^| $agent_id " "$PLUGIN_FILE" | \
54
- awk -F'|' '{print $5}' | \
55
- sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
56
-
57
- echo "$personality"
58
- }
59
-
60
- # Check if plugin is enabled
61
- is_plugin_enabled() {
62
- [[ -f "$ENABLED_FLAG" ]] && echo "true" || echo "false"
63
- }
64
-
65
- # Enable plugin
66
- enable_plugin() {
67
- mkdir -p "$PLUGIN_DIR"
68
-
69
- # Save current settings before enabling
70
- BACKUP_FILE="$PLUGIN_DIR/.bmad-previous-settings"
71
-
72
- # Save current voice
73
- if [[ -f ".claude/tts-voice.txt" ]]; then
74
- CURRENT_VOICE=$(cat .claude/tts-voice.txt 2>/dev/null)
75
- elif [[ -f "$HOME/.claude/tts-voice.txt" ]]; then
76
- CURRENT_VOICE=$(cat "$HOME/.claude/tts-voice.txt" 2>/dev/null)
77
- else
78
- CURRENT_VOICE="Aria"
79
- fi
80
-
81
- # Save current personality
82
- if [[ -f ".claude/tts-personality.txt" ]]; then
83
- CURRENT_PERSONALITY=$(cat .claude/tts-personality.txt 2>/dev/null)
84
- elif [[ -f "$HOME/.claude/tts-personality.txt" ]]; then
85
- CURRENT_PERSONALITY=$(cat "$HOME/.claude/tts-personality.txt" 2>/dev/null)
86
- else
87
- CURRENT_PERSONALITY="normal"
88
- fi
89
-
90
- # Save current sentiment
91
- if [[ -f ".claude/tts-sentiment.txt" ]]; then
92
- CURRENT_SENTIMENT=$(cat .claude/tts-sentiment.txt 2>/dev/null)
93
- elif [[ -f "$HOME/.claude/tts-sentiment.txt" ]]; then
94
- CURRENT_SENTIMENT=$(cat "$HOME/.claude/tts-sentiment.txt" 2>/dev/null)
95
- else
96
- CURRENT_SENTIMENT=""
97
- fi
98
-
99
- # Write backup
100
- cat > "$BACKUP_FILE" <<EOF
101
- VOICE=$CURRENT_VOICE
102
- PERSONALITY=$CURRENT_PERSONALITY
103
- SENTIMENT=$CURRENT_SENTIMENT
104
- EOF
105
-
106
- touch "$ENABLED_FLAG"
107
- echo "✅ BMAD voice plugin enabled"
108
- echo "💾 Previous settings backed up:"
109
- echo " Voice: $CURRENT_VOICE"
110
- echo " Personality: $CURRENT_PERSONALITY"
111
- [[ -n "$CURRENT_SENTIMENT" ]] && echo " Sentiment: $CURRENT_SENTIMENT"
112
- echo ""
113
- list_mappings
114
- }
115
-
116
- # Disable plugin
117
- disable_plugin() {
118
- BACKUP_FILE="$PLUGIN_DIR/.bmad-previous-settings"
119
-
120
- # Check if we have a backup to restore
121
- if [[ -f "$BACKUP_FILE" ]]; then
122
- source "$BACKUP_FILE"
123
-
124
- echo "❌ BMAD voice plugin disabled"
125
- echo "🔄 Restoring previous settings:"
126
- echo " Voice: $VOICE"
127
- echo " Personality: $PERSONALITY"
128
- [[ -n "$SENTIMENT" ]] && echo " Sentiment: $SENTIMENT"
129
-
130
- # Restore voice
131
- if [[ -n "$VOICE" ]]; then
132
- echo "$VOICE" > .claude/tts-voice.txt 2>/dev/null || echo "$VOICE" > "$HOME/.claude/tts-voice.txt"
133
- fi
134
-
135
- # Restore personality
136
- if [[ -n "$PERSONALITY" ]] && [[ "$PERSONALITY" != "normal" ]]; then
137
- echo "$PERSONALITY" > .claude/tts-personality.txt 2>/dev/null || echo "$PERSONALITY" > "$HOME/.claude/tts-personality.txt"
138
- fi
139
-
140
- # Restore sentiment
141
- if [[ -n "$SENTIMENT" ]]; then
142
- echo "$SENTIMENT" > .claude/tts-sentiment.txt 2>/dev/null || echo "$SENTIMENT" > "$HOME/.claude/tts-sentiment.txt"
143
- fi
144
-
145
- # Clean up backup
146
- rm -f "$BACKUP_FILE"
147
- else
148
- echo "❌ BMAD voice plugin disabled"
149
- echo "⚠️ No previous settings found to restore"
150
- echo "AgentVibes will use current voice/personality settings"
151
- fi
152
-
153
- rm -f "$ENABLED_FLAG"
154
- }
155
-
156
- # List all mappings
157
- list_mappings() {
158
- if [[ ! -f "$PLUGIN_FILE" ]]; then
159
- echo "❌ Plugin file not found: $PLUGIN_FILE"
160
- return 1
161
- fi
162
-
163
- echo "📊 BMAD Agent Voice Mappings:"
164
- echo ""
165
-
166
- grep "^| " "$PLUGIN_FILE" | grep -v "Agent ID" | grep -v "^|---" | \
167
- while IFS='|' read -r _ agent_id name voice personality _; do
168
- agent_id=$(echo "$agent_id" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
169
- name=$(echo "$name" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
170
- voice=$(echo "$voice" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
171
- personality=$(echo "$personality" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
172
-
173
- [[ -n "$agent_id" ]] && echo " $agent_id → $voice [$personality]"
174
- done
175
- }
176
-
177
- # Set voice for agent
178
- set_agent_voice() {
179
- local agent_id="$1"
180
- local voice="$2"
181
- local personality="${3:-normal}"
182
-
183
- if [[ ! -f "$PLUGIN_FILE" ]]; then
184
- echo "❌ Plugin file not found: $PLUGIN_FILE"
185
- return 1
186
- fi
187
-
188
- # Check if agent exists
189
- if ! grep -q "^| $agent_id " "$PLUGIN_FILE"; then
190
- echo "❌ Agent '$agent_id' not found in plugin"
191
- return 1
192
- fi
193
-
194
- # Update the voice and personality in the table
195
- sed -i.bak "s/^| $agent_id |.*| .* | .* |$/| $agent_id | $(grep "^| $agent_id " "$PLUGIN_FILE" | awk -F'|' '{print $3}') | $voice | $personality |/" "$PLUGIN_FILE"
196
-
197
- echo "✅ Updated $agent_id → $voice [$personality]"
198
- }
199
-
200
- # Show status
201
- show_status() {
202
- # Check for BMAD installation
203
- local bmad_installed="false"
204
- if [[ -f ".bmad-core/install-manifest.yaml" ]]; then
205
- bmad_installed="true"
206
- fi
207
-
208
- if [[ $(is_plugin_enabled) == "true" ]]; then
209
- echo "✅ BMAD voice plugin: ENABLED"
210
- if [[ "$bmad_installed" == "true" ]]; then
211
- echo "🔍 BMAD detected: Auto-enabled"
212
- fi
213
- else
214
- echo "❌ BMAD voice plugin: DISABLED"
215
- if [[ "$bmad_installed" == "true" ]]; then
216
- echo "⚠️ BMAD detected but plugin disabled (enable with: /agent-vibes-bmad enable)"
217
- fi
218
- fi
219
- echo ""
220
- list_mappings
221
- }
222
-
223
- # Edit plugin file
224
- edit_plugin() {
225
- if [[ ! -f "$PLUGIN_FILE" ]]; then
226
- echo "❌ Plugin file not found: $PLUGIN_FILE"
227
- return 1
228
- fi
229
-
230
- echo "Opening $PLUGIN_FILE for editing..."
231
- echo "Edit the markdown table to change voice mappings"
232
- }
233
-
234
- # Main command dispatcher
235
- case "${1:-help}" in
236
- enable)
237
- enable_plugin
238
- ;;
239
- disable)
240
- disable_plugin
241
- ;;
242
- status)
243
- show_status
244
- ;;
245
- list)
246
- list_mappings
247
- ;;
248
- set)
249
- if [[ -z "$2" ]] || [[ -z "$3" ]]; then
250
- echo "Usage: bmad-voice-manager.sh set <agent-id> <voice> [personality]"
251
- exit 1
252
- fi
253
- set_agent_voice "$2" "$3" "$4"
254
- ;;
255
- get-voice)
256
- get_agent_voice "$2"
257
- ;;
258
- get-personality)
259
- get_agent_personality "$2"
260
- ;;
261
- edit)
262
- edit_plugin
263
- ;;
264
- *)
265
- echo "Usage: bmad-voice-manager.sh {enable|disable|status|list|set|get-voice|get-personality|edit}"
266
- echo ""
267
- echo "Commands:"
268
- echo " enable Enable BMAD voice plugin"
269
- echo " disable Disable BMAD voice plugin"
270
- echo " status Show plugin status and mappings"
271
- echo " list List all agent voice mappings"
272
- echo " set <id> <voice> Set voice for agent"
273
- echo " get-voice <id> Get voice for agent"
274
- echo " get-personality <id> Get personality for agent"
275
- echo " edit Edit plugin configuration"
276
- exit 1
277
- ;;
278
- esac
@@ -1,190 +0,0 @@
1
- #!/bin/bash
2
- # Language Manager for AgentVibes
3
- # Manages language settings and multilingual voice selection
4
-
5
- # Determine project or global config
6
- # Use logical path (not physical) to handle symlinked .claude directories
7
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8
- CLAUDE_DIR="$(cd "$SCRIPT_DIR/.." 2>/dev/null && pwd)"
9
-
10
- # Check if we have a project-local .claude directory
11
- if [[ -d "$CLAUDE_DIR" ]] && [[ "$CLAUDE_DIR" != "$HOME/.claude" ]]; then
12
- LANGUAGE_FILE="$CLAUDE_DIR/tts-language.txt"
13
- else
14
- LANGUAGE_FILE="$HOME/.claude/tts-language.txt"
15
- mkdir -p "$HOME/.claude"
16
- fi
17
-
18
- # Language to multilingual voice mapping
19
- declare -A LANGUAGE_VOICES=(
20
- ["spanish"]="Antoni"
21
- ["french"]="Rachel"
22
- ["german"]="Domi"
23
- ["italian"]="Bella"
24
- ["portuguese"]="Matilda"
25
- ["chinese"]="Antoni"
26
- ["japanese"]="Antoni"
27
- ["korean"]="Antoni"
28
- ["russian"]="Domi"
29
- ["polish"]="Antoni"
30
- ["dutch"]="Rachel"
31
- ["turkish"]="Antoni"
32
- ["arabic"]="Antoni"
33
- ["hindi"]="Antoni"
34
- ["swedish"]="Rachel"
35
- ["danish"]="Rachel"
36
- ["norwegian"]="Rachel"
37
- ["finnish"]="Rachel"
38
- ["czech"]="Domi"
39
- ["romanian"]="Rachel"
40
- ["ukrainian"]="Domi"
41
- ["greek"]="Antoni"
42
- ["bulgarian"]="Domi"
43
- ["croatian"]="Domi"
44
- ["slovak"]="Domi"
45
- )
46
-
47
- # Supported languages list
48
- SUPPORTED_LANGUAGES="spanish, french, german, italian, portuguese, chinese, japanese, korean, polish, dutch, turkish, russian, arabic, hindi, swedish, danish, norwegian, finnish, czech, romanian, ukrainian, greek, bulgarian, croatian, slovak"
49
-
50
- # Function to set language
51
- set_language() {
52
- local lang="$1"
53
-
54
- # Convert to lowercase
55
- lang=$(echo "$lang" | tr '[:upper:]' '[:lower:]')
56
-
57
- # Handle reset/english
58
- if [[ "$lang" == "reset" ]] || [[ "$lang" == "english" ]] || [[ "$lang" == "en" ]]; then
59
- if [[ -f "$LANGUAGE_FILE" ]]; then
60
- rm "$LANGUAGE_FILE"
61
- echo "✓ Language reset to English (default)"
62
- else
63
- echo "Already using English (default)"
64
- fi
65
- return 0
66
- fi
67
-
68
- # Check if language is supported
69
- if [[ ! " ${!LANGUAGE_VOICES[@]} " =~ " ${lang} " ]]; then
70
- echo "❌ Language '$lang' not supported"
71
- echo ""
72
- echo "Supported languages:"
73
- echo "$SUPPORTED_LANGUAGES"
74
- return 1
75
- fi
76
-
77
- # Save language
78
- echo "$lang" > "$LANGUAGE_FILE"
79
-
80
- # Get recommended voice
81
- local recommended_voice="${LANGUAGE_VOICES[$lang]}"
82
-
83
- echo "✓ Language set to: $lang"
84
- echo "📢 Recommended multilingual voice: $recommended_voice"
85
- echo ""
86
- echo "TTS will now speak in $lang using multilingual voices."
87
- echo "Switch voice with: /agent-vibes:switch \"$recommended_voice\""
88
- }
89
-
90
- # Function to get current language
91
- get_language() {
92
- if [[ -f "$LANGUAGE_FILE" ]]; then
93
- local lang=$(cat "$LANGUAGE_FILE")
94
- local recommended_voice="${LANGUAGE_VOICES[$lang]}"
95
- echo "Current language: $lang"
96
- echo "Recommended voice: $recommended_voice"
97
- else
98
- echo "Current language: english (default)"
99
- echo "No multilingual voice required"
100
- fi
101
- }
102
-
103
- # Function to get language for use in other scripts
104
- get_language_code() {
105
- if [[ -f "$LANGUAGE_FILE" ]]; then
106
- cat "$LANGUAGE_FILE"
107
- else
108
- echo "english"
109
- fi
110
- }
111
-
112
- # Function to check if current voice supports language
113
- is_voice_multilingual() {
114
- local voice="$1"
115
-
116
- # List of multilingual voices
117
- local multilingual_voices=("Antoni" "Rachel" "Domi" "Bella" "Charlotte" "Matilda")
118
-
119
- for mv in "${multilingual_voices[@]}"; do
120
- if [[ "$voice" == "$mv" ]]; then
121
- return 0
122
- fi
123
- done
124
-
125
- return 1
126
- }
127
-
128
- # Function to get best voice for current language
129
- get_best_voice_for_language() {
130
- local lang=$(get_language_code)
131
-
132
- if [[ "$lang" == "english" ]]; then
133
- # No specific multilingual voice needed for English
134
- echo ""
135
- return
136
- fi
137
-
138
- # Return recommended voice for language
139
- echo "${LANGUAGE_VOICES[$lang]}"
140
- }
141
-
142
- # Main command handler
143
- case "${1:-}" in
144
- set)
145
- if [[ -z "$2" ]]; then
146
- echo "Usage: language-manager.sh set <language>"
147
- exit 1
148
- fi
149
- set_language "$2"
150
- ;;
151
- get)
152
- get_language
153
- ;;
154
- code)
155
- get_language_code
156
- ;;
157
- check-voice)
158
- if [[ -z "$2" ]]; then
159
- echo "Usage: language-manager.sh check-voice <voice-name>"
160
- exit 1
161
- fi
162
- if is_voice_multilingual "$2"; then
163
- echo "yes"
164
- else
165
- echo "no"
166
- fi
167
- ;;
168
- best-voice)
169
- get_best_voice_for_language
170
- ;;
171
- list)
172
- echo "Supported languages and recommended voices:"
173
- echo ""
174
- for lang in "${!LANGUAGE_VOICES[@]}"; do
175
- printf "%-15s → %s\n" "$lang" "${LANGUAGE_VOICES[$lang]}"
176
- done | sort
177
- ;;
178
- *)
179
- echo "AgentVibes Language Manager"
180
- echo ""
181
- echo "Usage:"
182
- echo " language-manager.sh set <language> Set language"
183
- echo " language-manager.sh get Get current language"
184
- echo " language-manager.sh code Get language code only"
185
- echo " language-manager.sh check-voice <name> Check if voice is multilingual"
186
- echo " language-manager.sh best-voice Get best voice for current language"
187
- echo " language-manager.sh list List all supported languages"
188
- exit 1
189
- ;;
190
- esac