agentvibes 2.0.20 → 2.0.22
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/agents/health-coach.md +154 -0
- package/.claude/agents/motivator.md +171 -0
- package/.claude/agents/negotiator.md +97 -0
- package/.claude/commands/agent-vibes/agent-health-coach.md +15 -0
- package/.claude/commands/agent-vibes/agent-motivator.md +15 -0
- package/.claude/commands/agent-vibes/agent-negotiator.md +15 -0
- package/.claude/commands/agent-vibes/agent.md +79 -0
- package/.claude/commands/agent-vibes/commands.json +4 -0
- package/.claude/commands/agent-vibes/set-favorite-voice.md +84 -0
- package/.claude/github-star-reminder.txt +1 -1
- package/.claude/hooks/download-extra-voices.sh +244 -0
- package/.claude/hooks/personality-manager.sh +81 -0
- package/.claude/hooks/piper-download-voices.sh +3 -93
- package/.claude/hooks/piper-multispeaker-registry.sh +165 -0
- package/.claude/hooks/play-tts-elevenlabs.sh +5 -3
- package/.claude/hooks/play-tts-piper.sh +27 -44
- package/.claude/hooks/provider-manager.sh +24 -5
- package/.claude/hooks/speed-manager.sh +10 -12
- package/.claude/hooks/voice-manager.sh +94 -56
- package/README.md +0 -3
- package/RELEASE_NOTES.md +40 -247
- package/docs/agents.md +485 -0
- package/docs/commands.md +1 -21
- package/docs/extra-voices-implementation-summary.md +235 -0
- package/docs/voice-registration-fix.md +254 -0
- package/fix-vscode-colors.sh +88 -0
- package/fixcolors +88 -0
- package/generate-all-agent-voices.sh +174 -0
- package/generate-missing-elevenlabs-complete.sh +236 -0
- package/generate-missing-elevenlabs.sh +110 -0
- package/generate-new-voices.sh +108 -0
- package/generate-piper-agent-intros.sh +85 -0
- package/generate-provider-and-agent-intros.sh +136 -0
- package/logo/fav_icon_128x128.png +0 -0
- package/logo/fav_icon_128x128.png:Zone.Identifier +4 -0
- package/logo/logo1.webp +0 -0
- package/logo/logo1.webp:Zone.Identifier +4 -0
- package/logo/social.png +0 -0
- package/logo/social.png:Zone.Identifier +4 -0
- package/mcp-server/agentvibes.db +0 -0
- package/mcp-server/server.py +47 -14
- package/package.json +3 -3
- package/regenerate-agent-voices.sh +79 -0
- package/test/unit/provider-manager.bats +8 -5
- package/test/unit/speed-manager.bats +4 -4
- package/agentvibes.org/.claude/audio/tts-padded-1760744118.mp3 +0 -0
- package/agentvibes.org/.claude/audio/tts-padded-1760748535.mp3 +0 -0
- package/agentvibes.org/.claude/audio/tts-padded-1760748676.mp3 +0 -0
- package/agentvibes.org/.claude/audio/tts-padded-1760750748.mp3 +0 -0
- package/agentvibes.org/.claude/audio/tts-padded-1760750947.mp3 +0 -0
- package/agentvibes.org/.claude/audio/tts-padded-1760752718.mp3 +0 -0
- package/agentvibes.org/.claude/audio/tts-padded-1760752907.mp3 +0 -0
- package/agentvibes.org/.claude/audio/tts-padded-1760753017.mp3 +0 -0
- package/agentvibes.org/.claude/audio/tts-padded-1760753045.mp3 +0 -0
- package/agentvibes.org/.claude/audio/tts-padded-1760753241.mp3 +0 -0
- package/agentvibes.org/.claude/audio/tts-padded-1760753315.mp3 +0 -0
- package/agentvibes.org/.claude/audio/tts-padded-1760753382.mp3 +0 -0
- package/agentvibes.org/.claude/audio/tts-padded-1760753408.mp3 +0 -0
- package/agentvibes.org/.claude/audio/tts-padded-1760753426.mp3 +0 -0
- package/agentvibes.org/.claude/audio/tts-padded-1760753446.mp3 +0 -0
- package/agentvibes.org/.claude/audio/tts-padded-1760753541.mp3 +0 -0
- package/agentvibes.org/.claude/audio/tts-padded-1760753553.mp3 +0 -0
- package/agentvibes.org/.claude/audio/tts-padded-1760753577.mp3 +0 -0
- package/agentvibes.org/.claude/commands/agent-vibes/add.md +0 -21
- package/agentvibes.org/.claude/commands/agent-vibes/agent-vibes.md +0 -68
- package/agentvibes.org/.claude/commands/agent-vibes/bmad.md +0 -196
- package/agentvibes.org/.claude/commands/agent-vibes/commands.json +0 -77
- package/agentvibes.org/.claude/commands/agent-vibes/get.md +0 -9
- package/agentvibes.org/.claude/commands/agent-vibes/language.md +0 -23
- package/agentvibes.org/.claude/commands/agent-vibes/learn.md +0 -67
- package/agentvibes.org/.claude/commands/agent-vibes/list.md +0 -13
- package/agentvibes.org/.claude/commands/agent-vibes/personality.md +0 -79
- package/agentvibes.org/.claude/commands/agent-vibes/preview.md +0 -17
- package/agentvibes.org/.claude/commands/agent-vibes/provider.md +0 -54
- package/agentvibes.org/.claude/commands/agent-vibes/replay-target.md +0 -14
- package/agentvibes.org/.claude/commands/agent-vibes/replay.md +0 -19
- package/agentvibes.org/.claude/commands/agent-vibes/sample.md +0 -12
- package/agentvibes.org/.claude/commands/agent-vibes/sentiment.md +0 -52
- package/agentvibes.org/.claude/commands/agent-vibes/set-language.md +0 -47
- package/agentvibes.org/.claude/commands/agent-vibes/set-pretext.md +0 -65
- package/agentvibes.org/.claude/commands/agent-vibes/set-speed.md +0 -41
- package/agentvibes.org/.claude/commands/agent-vibes/switch.md +0 -53
- package/agentvibes.org/.claude/commands/agent-vibes/target-voice.md +0 -26
- package/agentvibes.org/.claude/commands/agent-vibes/target.md +0 -30
- package/agentvibes.org/.claude/commands/agent-vibes/update.md +0 -20
- package/agentvibes.org/.claude/commands/agent-vibes/version.md +0 -10
- package/agentvibes.org/.claude/commands/agent-vibes/whoami.md +0 -7
- package/agentvibes.org/.claude/hooks/bmad-tts-injector.sh +0 -386
- package/agentvibes.org/.claude/hooks/bmad-voice-manager.sh +0 -375
- package/agentvibes.org/.claude/hooks/check-output-style.sh +0 -60
- package/agentvibes.org/.claude/hooks/github-star-reminder.sh +0 -94
- package/agentvibes.org/.claude/hooks/language-manager.sh +0 -360
- package/agentvibes.org/.claude/hooks/learn-manager.sh +0 -443
- package/agentvibes.org/.claude/hooks/personality-manager.sh +0 -324
- package/agentvibes.org/.claude/hooks/piper-download-voices.sh +0 -133
- package/agentvibes.org/.claude/hooks/piper-installer.sh +0 -144
- package/agentvibes.org/.claude/hooks/piper-voice-manager.sh +0 -227
- package/agentvibes.org/.claude/hooks/play-tts-elevenlabs.sh +0 -376
- package/agentvibes.org/.claude/hooks/play-tts-piper.sh +0 -281
- package/agentvibes.org/.claude/hooks/play-tts.sh +0 -69
- package/agentvibes.org/.claude/hooks/provider-commands.sh +0 -505
- package/agentvibes.org/.claude/hooks/provider-manager.sh +0 -248
- package/agentvibes.org/.claude/hooks/replay-target-audio.sh +0 -64
- package/agentvibes.org/.claude/hooks/sentiment-manager.sh +0 -163
- package/agentvibes.org/.claude/hooks/speed-manager.sh +0 -259
- package/agentvibes.org/.claude/hooks/voice-manager.sh +0 -477
- package/agentvibes.org/.claude/hooks/voices-config.sh +0 -33
- package/agentvibes.org/.claude/journal/2025-10-07.html +0 -373
- package/agentvibes.org/.claude/journal/index.html +0 -91
- package/agentvibes.org/.claude/output-styles/agent-vibes.md +0 -203
- package/agentvibes.org/.claude/personalities/angry.md +0 -17
- package/agentvibes.org/.claude/personalities/annoying.md +0 -17
- package/agentvibes.org/.claude/personalities/crass.md +0 -17
- package/agentvibes.org/.claude/personalities/dramatic.md +0 -17
- package/agentvibes.org/.claude/personalities/dry-humor.md +0 -53
- package/agentvibes.org/.claude/personalities/flirty.md +0 -23
- package/agentvibes.org/.claude/personalities/funny.md +0 -17
- package/agentvibes.org/.claude/personalities/grandpa.md +0 -35
- package/agentvibes.org/.claude/personalities/millennial.md +0 -17
- package/agentvibes.org/.claude/personalities/moody.md +0 -17
- package/agentvibes.org/.claude/personalities/normal.md +0 -19
- package/agentvibes.org/.claude/personalities/pirate.md +0 -17
- package/agentvibes.org/.claude/personalities/poetic.md +0 -17
- package/agentvibes.org/.claude/personalities/professional.md +0 -17
- package/agentvibes.org/.claude/personalities/robot.md +0 -17
- package/agentvibes.org/.claude/personalities/sarcastic.md +0 -41
- package/agentvibes.org/.claude/personalities/sassy.md +0 -17
- package/agentvibes.org/.claude/personalities/surfer-dude.md +0 -17
- package/agentvibes.org/.claude/personalities/zen.md +0 -17
- package/agentvibes.org/.claude/piper-voices-dir.txt +0 -1
- package/agentvibes.org/.claude/plugins/bmad-voices.md +0 -42
- package/agentvibes.org/.claude/tts-provider.txt +0 -1
- package/agentvibes.org/.mcp-minimal.json +0 -60
- package/agentvibes.org/CHANGELOG.md +0 -56
- package/agentvibes.org/README.md +0 -93
- package/agentvibes.org/app/(auth)/layout.tsx +0 -15
- package/agentvibes.org/app/(auth)/reset-password/page.tsx +0 -45
- package/agentvibes.org/app/(auth)/signin/page.tsx +0 -82
- package/agentvibes.org/app/(auth)/signup/page.tsx +0 -104
- package/agentvibes.org/app/(default)/blog/[slug]/page.tsx +0 -128
- package/agentvibes.org/app/(default)/blog/page.tsx +0 -95
- package/agentvibes.org/app/(default)/layout.tsx +0 -31
- package/agentvibes.org/app/(default)/page.tsx +0 -20
- package/agentvibes.org/app/api/hello/route.ts +0 -3
- package/agentvibes.org/app/css/additional-styles/theme.css +0 -82
- package/agentvibes.org/app/css/additional-styles/utility-patterns.css +0 -55
- package/agentvibes.org/app/css/style.css +0 -100
- package/agentvibes.org/app/layout.tsx +0 -63
- package/agentvibes.org/components/code-block.tsx +0 -27
- package/agentvibes.org/components/cta.tsx +0 -58
- package/agentvibes.org/components/features.tsx +0 -256
- package/agentvibes.org/components/hero-home.tsx +0 -133
- package/agentvibes.org/components/mdx-components.tsx +0 -128
- package/agentvibes.org/components/modal-video.tsx +0 -137
- package/agentvibes.org/components/page-illustration.tsx +0 -55
- package/agentvibes.org/components/spotlight.tsx +0 -77
- package/agentvibes.org/components/testimonials.tsx +0 -282
- package/agentvibes.org/components/ui/footer.tsx +0 -82
- package/agentvibes.org/components/ui/header.tsx +0 -68
- package/agentvibes.org/components/ui/logo.tsx +0 -10
- package/agentvibes.org/components/workflows.tsx +0 -176
- package/agentvibes.org/content/blog/discovering-new-piper-voices.mdx +0 -253
- package/agentvibes.org/content/blog/getting-started-agentvibes.mdx +0 -228
- package/agentvibes.org/content/blog/introducing-agentvibes-v2.mdx +0 -250
- package/agentvibes.org/content/blog/language-learning-with-agentvibes.mdx +0 -142
- package/agentvibes.org/content/blog/voice-personalities-guide.mdx +0 -119
- package/agentvibes.org/lib/blog.ts +0 -73
- package/agentvibes.org/next.config.js +0 -6
- package/agentvibes.org/package-lock.json +0 -4285
- package/agentvibes.org/package.json +0 -40
- package/agentvibes.org/pnpm-lock.yaml +0 -1141
- package/agentvibes.org/postcss.config.js +0 -5
- 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/piper-voices/speaker_0_Cori_Samuel.wav +0 -0
- package/agentvibes.org/public/audio/piper-voices/speaker_10_Steve_C.wav +0 -0
- package/agentvibes.org/public/audio/piper-voices/speaker_11_Owlivia.wav +0 -0
- package/agentvibes.org/public/audio/piper-voices/speaker_12_Paul_Hampton.wav +0 -0
- package/agentvibes.org/public/audio/piper-voices/speaker_13_Jennifer_Dorr.wav +0 -0
- package/agentvibes.org/public/audio/piper-voices/speaker_14_Emily_Cripps.wav +0 -0
- package/agentvibes.org/public/audio/piper-voices/speaker_15_Martin_Clifton.wav +0 -0
- package/agentvibes.org/public/audio/piper-voices/speaker_1_Kara_Shallenberg.wav +0 -0
- package/agentvibes.org/public/audio/piper-voices/speaker_2_Kristin_Hughes.wav +0 -0
- package/agentvibes.org/public/audio/piper-voices/speaker_3_Maria_Kasper.wav +0 -0
- package/agentvibes.org/public/audio/piper-voices/speaker_4_Mike_Pelton.wav +0 -0
- package/agentvibes.org/public/audio/piper-voices/speaker_5_Mark_Nelson.wav +0 -0
- package/agentvibes.org/public/audio/piper-voices/speaker_6_Michael_Scherer.wav +0 -0
- package/agentvibes.org/public/audio/piper-voices/speaker_7_James_K_White.wav +0 -0
- package/agentvibes.org/public/audio/piper-voices/speaker_8_Rose_Ibex.wav +0 -0
- package/agentvibes.org/public/audio/piper-voices/speaker_9_progressingamerica.wav +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 +0 -1
- package/agentvibes.org/public/images/blurred-shape.svg +0 -1
- package/agentvibes.org/public/images/client-logo-01.svg +0 -1
- package/agentvibes.org/public/images/client-logo-02.svg +0 -1
- package/agentvibes.org/public/images/client-logo-03.svg +0 -1
- package/agentvibes.org/public/images/client-logo-04.svg +0 -1
- package/agentvibes.org/public/images/client-logo-05.svg +0 -1
- package/agentvibes.org/public/images/client-logo-06.svg +0 -1
- package/agentvibes.org/public/images/client-logo-07.svg +0 -1
- package/agentvibes.org/public/images/client-logo-08.svg +0 -1
- package/agentvibes.org/public/images/client-logo-09.svg +0 -1
- package/agentvibes.org/public/images/features.png +0 -0
- package/agentvibes.org/public/images/footer-illustration.svg +0 -1
- package/agentvibes.org/public/images/hero-image-01.jpg +0 -0
- package/agentvibes.org/public/images/logo.svg +0 -1
- package/agentvibes.org/public/images/page-illustration.svg +0 -1
- package/agentvibes.org/public/images/secondary-illustration.svg +0 -1
- 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 +0 -28
- package/agentvibes.org/utils/useMasonry.tsx +0 -67
- package/agentvibes.org/utils/useMousePosition.tsx +0 -27
- package/docs/bryce-beattie-voice-licensing.md +0 -131
|
@@ -1,360 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Language Manager for AgentVibes
|
|
3
|
-
# Manages language settings and multilingual voice selection
|
|
4
|
-
|
|
5
|
-
# Determine target .claude directory based on context
|
|
6
|
-
# Priority:
|
|
7
|
-
# 1. CLAUDE_PROJECT_DIR env var (set by MCP for project-specific settings)
|
|
8
|
-
# 2. Script location (for direct slash command usage)
|
|
9
|
-
# 3. Global ~/.claude (fallback)
|
|
10
|
-
|
|
11
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
12
|
-
|
|
13
|
-
if [[ -n "$CLAUDE_PROJECT_DIR" ]] && [[ -d "$CLAUDE_PROJECT_DIR/.claude" ]]; then
|
|
14
|
-
# MCP context: Use the project directory where MCP was invoked
|
|
15
|
-
CLAUDE_DIR="$CLAUDE_PROJECT_DIR/.claude"
|
|
16
|
-
else
|
|
17
|
-
# Direct usage context: Use script location
|
|
18
|
-
CLAUDE_DIR="$(cd "$SCRIPT_DIR/.." 2>/dev/null && pwd)"
|
|
19
|
-
|
|
20
|
-
# If script is in global ~/.claude, use that
|
|
21
|
-
if [[ "$CLAUDE_DIR" == "$HOME/.claude" ]]; then
|
|
22
|
-
CLAUDE_DIR="$HOME/.claude"
|
|
23
|
-
elif [[ ! -d "$CLAUDE_DIR" ]]; then
|
|
24
|
-
# Fallback to global if directory doesn't exist
|
|
25
|
-
CLAUDE_DIR="$HOME/.claude"
|
|
26
|
-
fi
|
|
27
|
-
fi
|
|
28
|
-
|
|
29
|
-
LANGUAGE_FILE="$CLAUDE_DIR/tts-language.txt"
|
|
30
|
-
mkdir -p "$CLAUDE_DIR"
|
|
31
|
-
|
|
32
|
-
# Source provider manager to detect active provider
|
|
33
|
-
source "$SCRIPT_DIR/provider-manager.sh" 2>/dev/null || true
|
|
34
|
-
|
|
35
|
-
# Language to ElevenLabs multilingual voice mapping
|
|
36
|
-
declare -A ELEVENLABS_VOICES=(
|
|
37
|
-
["spanish"]="Antoni"
|
|
38
|
-
["french"]="Rachel"
|
|
39
|
-
["german"]="Domi"
|
|
40
|
-
["italian"]="Bella"
|
|
41
|
-
["portuguese"]="Matilda"
|
|
42
|
-
["chinese"]="Antoni"
|
|
43
|
-
["japanese"]="Antoni"
|
|
44
|
-
["korean"]="Antoni"
|
|
45
|
-
["russian"]="Domi"
|
|
46
|
-
["polish"]="Antoni"
|
|
47
|
-
["dutch"]="Rachel"
|
|
48
|
-
["turkish"]="Antoni"
|
|
49
|
-
["arabic"]="Antoni"
|
|
50
|
-
["hindi"]="Antoni"
|
|
51
|
-
["swedish"]="Rachel"
|
|
52
|
-
["danish"]="Rachel"
|
|
53
|
-
["norwegian"]="Rachel"
|
|
54
|
-
["finnish"]="Rachel"
|
|
55
|
-
["czech"]="Domi"
|
|
56
|
-
["romanian"]="Rachel"
|
|
57
|
-
["ukrainian"]="Domi"
|
|
58
|
-
["greek"]="Antoni"
|
|
59
|
-
["bulgarian"]="Domi"
|
|
60
|
-
["croatian"]="Domi"
|
|
61
|
-
["slovak"]="Domi"
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
# Language to Piper voice model mapping
|
|
65
|
-
declare -A PIPER_VOICES=(
|
|
66
|
-
["spanish"]="es_ES-davefx-medium"
|
|
67
|
-
["french"]="fr_FR-siwis-medium"
|
|
68
|
-
["german"]="de_DE-thorsten-medium"
|
|
69
|
-
["italian"]="it_IT-riccardo-x_low"
|
|
70
|
-
["portuguese"]="pt_BR-faber-medium"
|
|
71
|
-
["chinese"]="zh_CN-huayan-medium"
|
|
72
|
-
["japanese"]="ja_JP-hikari-medium"
|
|
73
|
-
["korean"]="ko_KR-eunyoung-medium"
|
|
74
|
-
["russian"]="ru_RU-dmitri-medium"
|
|
75
|
-
["polish"]="pl_PL-darkman-medium"
|
|
76
|
-
["dutch"]="nl_NL-rdh-medium"
|
|
77
|
-
["turkish"]="tr_TR-dfki-medium"
|
|
78
|
-
["arabic"]="ar_JO-kareem-medium"
|
|
79
|
-
["hindi"]="hi_IN-amitabh-medium"
|
|
80
|
-
["swedish"]="sv_SE-nst-medium"
|
|
81
|
-
["danish"]="da_DK-talesyntese-medium"
|
|
82
|
-
["norwegian"]="no_NO-talesyntese-medium"
|
|
83
|
-
["finnish"]="fi_FI-harri-medium"
|
|
84
|
-
["czech"]="cs_CZ-jirka-medium"
|
|
85
|
-
["romanian"]="ro_RO-mihai-medium"
|
|
86
|
-
["ukrainian"]="uk_UA-lada-x_low"
|
|
87
|
-
["greek"]="el_GR-rapunzelina-low"
|
|
88
|
-
["bulgarian"]="bg_BG-valentin-medium"
|
|
89
|
-
["croatian"]="hr_HR-gorana-medium"
|
|
90
|
-
["slovak"]="sk_SK-lili-medium"
|
|
91
|
-
)
|
|
92
|
-
|
|
93
|
-
# Backward compatibility: Keep LANGUAGE_VOICES for existing code
|
|
94
|
-
declare -A LANGUAGE_VOICES=(
|
|
95
|
-
["spanish"]="Antoni"
|
|
96
|
-
["french"]="Rachel"
|
|
97
|
-
["german"]="Domi"
|
|
98
|
-
["italian"]="Bella"
|
|
99
|
-
["portuguese"]="Matilda"
|
|
100
|
-
["chinese"]="Antoni"
|
|
101
|
-
["japanese"]="Antoni"
|
|
102
|
-
["korean"]="Antoni"
|
|
103
|
-
["russian"]="Domi"
|
|
104
|
-
["polish"]="Antoni"
|
|
105
|
-
["dutch"]="Rachel"
|
|
106
|
-
["turkish"]="Antoni"
|
|
107
|
-
["arabic"]="Antoni"
|
|
108
|
-
["hindi"]="Antoni"
|
|
109
|
-
["swedish"]="Rachel"
|
|
110
|
-
["danish"]="Rachel"
|
|
111
|
-
["norwegian"]="Rachel"
|
|
112
|
-
["finnish"]="Rachel"
|
|
113
|
-
["czech"]="Domi"
|
|
114
|
-
["romanian"]="Rachel"
|
|
115
|
-
["ukrainian"]="Domi"
|
|
116
|
-
["greek"]="Antoni"
|
|
117
|
-
["bulgarian"]="Domi"
|
|
118
|
-
["croatian"]="Domi"
|
|
119
|
-
["slovak"]="Domi"
|
|
120
|
-
)
|
|
121
|
-
|
|
122
|
-
# Supported languages list
|
|
123
|
-
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"
|
|
124
|
-
|
|
125
|
-
# Function to set language
|
|
126
|
-
set_language() {
|
|
127
|
-
local lang="$1"
|
|
128
|
-
|
|
129
|
-
# Convert to lowercase
|
|
130
|
-
lang=$(echo "$lang" | tr '[:upper:]' '[:lower:]')
|
|
131
|
-
|
|
132
|
-
# Handle reset/english
|
|
133
|
-
if [[ "$lang" == "reset" ]] || [[ "$lang" == "english" ]] || [[ "$lang" == "en" ]]; then
|
|
134
|
-
if [[ -f "$LANGUAGE_FILE" ]]; then
|
|
135
|
-
rm "$LANGUAGE_FILE"
|
|
136
|
-
echo "✓ Language reset to English (default)"
|
|
137
|
-
else
|
|
138
|
-
echo "Already using English (default)"
|
|
139
|
-
fi
|
|
140
|
-
return 0
|
|
141
|
-
fi
|
|
142
|
-
|
|
143
|
-
# Check if language is supported
|
|
144
|
-
if [[ ! " ${!LANGUAGE_VOICES[@]} " =~ " ${lang} " ]]; then
|
|
145
|
-
echo "❌ Language '$lang' not supported"
|
|
146
|
-
echo ""
|
|
147
|
-
echo "Supported languages:"
|
|
148
|
-
echo "$SUPPORTED_LANGUAGES"
|
|
149
|
-
return 1
|
|
150
|
-
fi
|
|
151
|
-
|
|
152
|
-
# Save language
|
|
153
|
-
echo "$lang" > "$LANGUAGE_FILE"
|
|
154
|
-
|
|
155
|
-
# Detect active provider and get recommended voice
|
|
156
|
-
local provider=""
|
|
157
|
-
if [[ -f "$CLAUDE_DIR/tts-provider.txt" ]]; then
|
|
158
|
-
provider=$(cat "$CLAUDE_DIR/tts-provider.txt")
|
|
159
|
-
elif [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
|
|
160
|
-
provider=$(cat "$HOME/.claude/tts-provider.txt")
|
|
161
|
-
else
|
|
162
|
-
provider="elevenlabs"
|
|
163
|
-
fi
|
|
164
|
-
|
|
165
|
-
local recommended_voice=$(get_voice_for_language "$lang" "$provider")
|
|
166
|
-
|
|
167
|
-
# Fallback to old mapping if provider-aware function returns empty
|
|
168
|
-
if [[ -z "$recommended_voice" ]]; then
|
|
169
|
-
recommended_voice="${LANGUAGE_VOICES[$lang]}"
|
|
170
|
-
fi
|
|
171
|
-
|
|
172
|
-
echo "✓ Language set to: $lang"
|
|
173
|
-
echo "📢 Recommended voice for $provider TTS: $recommended_voice"
|
|
174
|
-
echo ""
|
|
175
|
-
echo "TTS will now speak in $lang."
|
|
176
|
-
echo "Switch voice with: /agent-vibes:switch \"$recommended_voice\""
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
# Function to get current language
|
|
180
|
-
get_language() {
|
|
181
|
-
if [[ -f "$LANGUAGE_FILE" ]]; then
|
|
182
|
-
local lang=$(cat "$LANGUAGE_FILE")
|
|
183
|
-
|
|
184
|
-
# Detect active provider
|
|
185
|
-
local provider=""
|
|
186
|
-
if [[ -f "$CLAUDE_DIR/tts-provider.txt" ]]; then
|
|
187
|
-
provider=$(cat "$CLAUDE_DIR/tts-provider.txt")
|
|
188
|
-
elif [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
|
|
189
|
-
provider=$(cat "$HOME/.claude/tts-provider.txt")
|
|
190
|
-
else
|
|
191
|
-
provider="elevenlabs"
|
|
192
|
-
fi
|
|
193
|
-
|
|
194
|
-
local recommended_voice=$(get_voice_for_language "$lang" "$provider")
|
|
195
|
-
|
|
196
|
-
# Fallback to old mapping
|
|
197
|
-
if [[ -z "$recommended_voice" ]]; then
|
|
198
|
-
recommended_voice="${LANGUAGE_VOICES[$lang]}"
|
|
199
|
-
fi
|
|
200
|
-
|
|
201
|
-
echo "Current language: $lang"
|
|
202
|
-
echo "Recommended voice ($provider): $recommended_voice"
|
|
203
|
-
else
|
|
204
|
-
echo "Current language: english (default)"
|
|
205
|
-
echo "No multilingual voice required"
|
|
206
|
-
fi
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
# Function to get language for use in other scripts
|
|
210
|
-
get_language_code() {
|
|
211
|
-
if [[ -f "$LANGUAGE_FILE" ]]; then
|
|
212
|
-
cat "$LANGUAGE_FILE"
|
|
213
|
-
else
|
|
214
|
-
echo "english"
|
|
215
|
-
fi
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
# Function to check if current voice supports language
|
|
219
|
-
is_voice_multilingual() {
|
|
220
|
-
local voice="$1"
|
|
221
|
-
|
|
222
|
-
# List of multilingual voices
|
|
223
|
-
local multilingual_voices=("Antoni" "Rachel" "Domi" "Bella" "Charlotte" "Matilda")
|
|
224
|
-
|
|
225
|
-
for mv in "${multilingual_voices[@]}"; do
|
|
226
|
-
if [[ "$voice" == "$mv" ]]; then
|
|
227
|
-
return 0
|
|
228
|
-
fi
|
|
229
|
-
done
|
|
230
|
-
|
|
231
|
-
return 1
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
# Function to get best voice for current language
|
|
235
|
-
get_best_voice_for_language() {
|
|
236
|
-
local lang=$(get_language_code)
|
|
237
|
-
|
|
238
|
-
if [[ "$lang" == "english" ]]; then
|
|
239
|
-
# No specific multilingual voice needed for English
|
|
240
|
-
echo ""
|
|
241
|
-
return
|
|
242
|
-
fi
|
|
243
|
-
|
|
244
|
-
# Return recommended voice for language
|
|
245
|
-
echo "${LANGUAGE_VOICES[$lang]}"
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
# Function to get voice for a specific language and provider
|
|
249
|
-
# Usage: get_voice_for_language <language> [provider]
|
|
250
|
-
# Provider: "elevenlabs" or "piper" (auto-detected if not provided)
|
|
251
|
-
get_voice_for_language() {
|
|
252
|
-
local language="$1"
|
|
253
|
-
local provider="${2:-}"
|
|
254
|
-
|
|
255
|
-
# Convert to lowercase
|
|
256
|
-
language=$(echo "$language" | tr '[:upper:]' '[:lower:]')
|
|
257
|
-
|
|
258
|
-
# Auto-detect provider if not specified
|
|
259
|
-
if [[ -z "$provider" ]]; then
|
|
260
|
-
if command -v get_active_provider &>/dev/null; then
|
|
261
|
-
provider=$(get_active_provider 2>/dev/null)
|
|
262
|
-
else
|
|
263
|
-
# Fallback to checking provider file directly
|
|
264
|
-
# Try current directory first, then search up the tree
|
|
265
|
-
local search_dir="$PWD"
|
|
266
|
-
local found=false
|
|
267
|
-
|
|
268
|
-
while [[ "$search_dir" != "/" ]]; do
|
|
269
|
-
if [[ -f "$search_dir/.claude/tts-provider.txt" ]]; then
|
|
270
|
-
provider=$(cat "$search_dir/.claude/tts-provider.txt")
|
|
271
|
-
found=true
|
|
272
|
-
break
|
|
273
|
-
fi
|
|
274
|
-
search_dir=$(dirname "$search_dir")
|
|
275
|
-
done
|
|
276
|
-
|
|
277
|
-
# If not found in project tree, check global
|
|
278
|
-
if [[ "$found" = false ]]; then
|
|
279
|
-
if [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
|
|
280
|
-
provider=$(cat "$HOME/.claude/tts-provider.txt")
|
|
281
|
-
else
|
|
282
|
-
provider="elevenlabs" # Default
|
|
283
|
-
fi
|
|
284
|
-
fi
|
|
285
|
-
fi
|
|
286
|
-
fi
|
|
287
|
-
|
|
288
|
-
# Return appropriate voice based on provider
|
|
289
|
-
case "$provider" in
|
|
290
|
-
piper)
|
|
291
|
-
echo "${PIPER_VOICES[$language]:-}"
|
|
292
|
-
;;
|
|
293
|
-
elevenlabs)
|
|
294
|
-
echo "${ELEVENLABS_VOICES[$language]:-}"
|
|
295
|
-
;;
|
|
296
|
-
*)
|
|
297
|
-
echo "${ELEVENLABS_VOICES[$language]:-}"
|
|
298
|
-
;;
|
|
299
|
-
esac
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
# Main command handler - only run if script is executed directly, not sourced
|
|
303
|
-
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
|
304
|
-
case "${1:-}" in
|
|
305
|
-
set)
|
|
306
|
-
if [[ -z "$2" ]]; then
|
|
307
|
-
echo "Usage: language-manager.sh set <language>"
|
|
308
|
-
exit 1
|
|
309
|
-
fi
|
|
310
|
-
set_language "$2"
|
|
311
|
-
;;
|
|
312
|
-
get)
|
|
313
|
-
get_language
|
|
314
|
-
;;
|
|
315
|
-
code)
|
|
316
|
-
get_language_code
|
|
317
|
-
;;
|
|
318
|
-
check-voice)
|
|
319
|
-
if [[ -z "$2" ]]; then
|
|
320
|
-
echo "Usage: language-manager.sh check-voice <voice-name>"
|
|
321
|
-
exit 1
|
|
322
|
-
fi
|
|
323
|
-
if is_voice_multilingual "$2"; then
|
|
324
|
-
echo "yes"
|
|
325
|
-
else
|
|
326
|
-
echo "no"
|
|
327
|
-
fi
|
|
328
|
-
;;
|
|
329
|
-
best-voice)
|
|
330
|
-
get_best_voice_for_language
|
|
331
|
-
;;
|
|
332
|
-
voice-for-language)
|
|
333
|
-
if [[ -z "$2" ]]; then
|
|
334
|
-
echo "Usage: language-manager.sh voice-for-language <language> [provider]"
|
|
335
|
-
exit 1
|
|
336
|
-
fi
|
|
337
|
-
get_voice_for_language "$2" "$3"
|
|
338
|
-
;;
|
|
339
|
-
list)
|
|
340
|
-
echo "Supported languages and recommended voices:"
|
|
341
|
-
echo ""
|
|
342
|
-
for lang in "${!LANGUAGE_VOICES[@]}"; do
|
|
343
|
-
printf "%-15s → %s\n" "$lang" "${LANGUAGE_VOICES[$lang]}"
|
|
344
|
-
done | sort
|
|
345
|
-
;;
|
|
346
|
-
*)
|
|
347
|
-
echo "AgentVibes Language Manager"
|
|
348
|
-
echo ""
|
|
349
|
-
echo "Usage:"
|
|
350
|
-
echo " language-manager.sh set <language> Set language"
|
|
351
|
-
echo " language-manager.sh get Get current language"
|
|
352
|
-
echo " language-manager.sh code Get language code only"
|
|
353
|
-
echo " language-manager.sh check-voice <name> Check if voice is multilingual"
|
|
354
|
-
echo " language-manager.sh best-voice Get best voice for current language"
|
|
355
|
-
echo " language-manager.sh voice-for-language <lang> [prov] Get voice for language & provider"
|
|
356
|
-
echo " language-manager.sh list List all supported languages"
|
|
357
|
-
exit 1
|
|
358
|
-
;;
|
|
359
|
-
esac
|
|
360
|
-
fi
|