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.
Files changed (233) hide show
  1. package/.claude/agents/health-coach.md +154 -0
  2. package/.claude/agents/motivator.md +171 -0
  3. package/.claude/agents/negotiator.md +97 -0
  4. package/.claude/commands/agent-vibes/agent-health-coach.md +15 -0
  5. package/.claude/commands/agent-vibes/agent-motivator.md +15 -0
  6. package/.claude/commands/agent-vibes/agent-negotiator.md +15 -0
  7. package/.claude/commands/agent-vibes/agent.md +79 -0
  8. package/.claude/commands/agent-vibes/commands.json +4 -0
  9. package/.claude/commands/agent-vibes/set-favorite-voice.md +84 -0
  10. package/.claude/github-star-reminder.txt +1 -1
  11. package/.claude/hooks/download-extra-voices.sh +244 -0
  12. package/.claude/hooks/personality-manager.sh +81 -0
  13. package/.claude/hooks/piper-download-voices.sh +3 -93
  14. package/.claude/hooks/piper-multispeaker-registry.sh +165 -0
  15. package/.claude/hooks/play-tts-elevenlabs.sh +5 -3
  16. package/.claude/hooks/play-tts-piper.sh +27 -44
  17. package/.claude/hooks/provider-manager.sh +24 -5
  18. package/.claude/hooks/speed-manager.sh +10 -12
  19. package/.claude/hooks/voice-manager.sh +94 -56
  20. package/README.md +0 -3
  21. package/RELEASE_NOTES.md +40 -247
  22. package/docs/agents.md +485 -0
  23. package/docs/commands.md +1 -21
  24. package/docs/extra-voices-implementation-summary.md +235 -0
  25. package/docs/voice-registration-fix.md +254 -0
  26. package/fix-vscode-colors.sh +88 -0
  27. package/fixcolors +88 -0
  28. package/generate-all-agent-voices.sh +174 -0
  29. package/generate-missing-elevenlabs-complete.sh +236 -0
  30. package/generate-missing-elevenlabs.sh +110 -0
  31. package/generate-new-voices.sh +108 -0
  32. package/generate-piper-agent-intros.sh +85 -0
  33. package/generate-provider-and-agent-intros.sh +136 -0
  34. package/logo/fav_icon_128x128.png +0 -0
  35. package/logo/fav_icon_128x128.png:Zone.Identifier +4 -0
  36. package/logo/logo1.webp +0 -0
  37. package/logo/logo1.webp:Zone.Identifier +4 -0
  38. package/logo/social.png +0 -0
  39. package/logo/social.png:Zone.Identifier +4 -0
  40. package/mcp-server/agentvibes.db +0 -0
  41. package/mcp-server/server.py +47 -14
  42. package/package.json +3 -3
  43. package/regenerate-agent-voices.sh +79 -0
  44. package/test/unit/provider-manager.bats +8 -5
  45. package/test/unit/speed-manager.bats +4 -4
  46. package/agentvibes.org/.claude/audio/tts-padded-1760744118.mp3 +0 -0
  47. package/agentvibes.org/.claude/audio/tts-padded-1760748535.mp3 +0 -0
  48. package/agentvibes.org/.claude/audio/tts-padded-1760748676.mp3 +0 -0
  49. package/agentvibes.org/.claude/audio/tts-padded-1760750748.mp3 +0 -0
  50. package/agentvibes.org/.claude/audio/tts-padded-1760750947.mp3 +0 -0
  51. package/agentvibes.org/.claude/audio/tts-padded-1760752718.mp3 +0 -0
  52. package/agentvibes.org/.claude/audio/tts-padded-1760752907.mp3 +0 -0
  53. package/agentvibes.org/.claude/audio/tts-padded-1760753017.mp3 +0 -0
  54. package/agentvibes.org/.claude/audio/tts-padded-1760753045.mp3 +0 -0
  55. package/agentvibes.org/.claude/audio/tts-padded-1760753241.mp3 +0 -0
  56. package/agentvibes.org/.claude/audio/tts-padded-1760753315.mp3 +0 -0
  57. package/agentvibes.org/.claude/audio/tts-padded-1760753382.mp3 +0 -0
  58. package/agentvibes.org/.claude/audio/tts-padded-1760753408.mp3 +0 -0
  59. package/agentvibes.org/.claude/audio/tts-padded-1760753426.mp3 +0 -0
  60. package/agentvibes.org/.claude/audio/tts-padded-1760753446.mp3 +0 -0
  61. package/agentvibes.org/.claude/audio/tts-padded-1760753541.mp3 +0 -0
  62. package/agentvibes.org/.claude/audio/tts-padded-1760753553.mp3 +0 -0
  63. package/agentvibes.org/.claude/audio/tts-padded-1760753577.mp3 +0 -0
  64. package/agentvibes.org/.claude/commands/agent-vibes/add.md +0 -21
  65. package/agentvibes.org/.claude/commands/agent-vibes/agent-vibes.md +0 -68
  66. package/agentvibes.org/.claude/commands/agent-vibes/bmad.md +0 -196
  67. package/agentvibes.org/.claude/commands/agent-vibes/commands.json +0 -77
  68. package/agentvibes.org/.claude/commands/agent-vibes/get.md +0 -9
  69. package/agentvibes.org/.claude/commands/agent-vibes/language.md +0 -23
  70. package/agentvibes.org/.claude/commands/agent-vibes/learn.md +0 -67
  71. package/agentvibes.org/.claude/commands/agent-vibes/list.md +0 -13
  72. package/agentvibes.org/.claude/commands/agent-vibes/personality.md +0 -79
  73. package/agentvibes.org/.claude/commands/agent-vibes/preview.md +0 -17
  74. package/agentvibes.org/.claude/commands/agent-vibes/provider.md +0 -54
  75. package/agentvibes.org/.claude/commands/agent-vibes/replay-target.md +0 -14
  76. package/agentvibes.org/.claude/commands/agent-vibes/replay.md +0 -19
  77. package/agentvibes.org/.claude/commands/agent-vibes/sample.md +0 -12
  78. package/agentvibes.org/.claude/commands/agent-vibes/sentiment.md +0 -52
  79. package/agentvibes.org/.claude/commands/agent-vibes/set-language.md +0 -47
  80. package/agentvibes.org/.claude/commands/agent-vibes/set-pretext.md +0 -65
  81. package/agentvibes.org/.claude/commands/agent-vibes/set-speed.md +0 -41
  82. package/agentvibes.org/.claude/commands/agent-vibes/switch.md +0 -53
  83. package/agentvibes.org/.claude/commands/agent-vibes/target-voice.md +0 -26
  84. package/agentvibes.org/.claude/commands/agent-vibes/target.md +0 -30
  85. package/agentvibes.org/.claude/commands/agent-vibes/update.md +0 -20
  86. package/agentvibes.org/.claude/commands/agent-vibes/version.md +0 -10
  87. package/agentvibes.org/.claude/commands/agent-vibes/whoami.md +0 -7
  88. package/agentvibes.org/.claude/hooks/bmad-tts-injector.sh +0 -386
  89. package/agentvibes.org/.claude/hooks/bmad-voice-manager.sh +0 -375
  90. package/agentvibes.org/.claude/hooks/check-output-style.sh +0 -60
  91. package/agentvibes.org/.claude/hooks/github-star-reminder.sh +0 -94
  92. package/agentvibes.org/.claude/hooks/language-manager.sh +0 -360
  93. package/agentvibes.org/.claude/hooks/learn-manager.sh +0 -443
  94. package/agentvibes.org/.claude/hooks/personality-manager.sh +0 -324
  95. package/agentvibes.org/.claude/hooks/piper-download-voices.sh +0 -133
  96. package/agentvibes.org/.claude/hooks/piper-installer.sh +0 -144
  97. package/agentvibes.org/.claude/hooks/piper-voice-manager.sh +0 -227
  98. package/agentvibes.org/.claude/hooks/play-tts-elevenlabs.sh +0 -376
  99. package/agentvibes.org/.claude/hooks/play-tts-piper.sh +0 -281
  100. package/agentvibes.org/.claude/hooks/play-tts.sh +0 -69
  101. package/agentvibes.org/.claude/hooks/provider-commands.sh +0 -505
  102. package/agentvibes.org/.claude/hooks/provider-manager.sh +0 -248
  103. package/agentvibes.org/.claude/hooks/replay-target-audio.sh +0 -64
  104. package/agentvibes.org/.claude/hooks/sentiment-manager.sh +0 -163
  105. package/agentvibes.org/.claude/hooks/speed-manager.sh +0 -259
  106. package/agentvibes.org/.claude/hooks/voice-manager.sh +0 -477
  107. package/agentvibes.org/.claude/hooks/voices-config.sh +0 -33
  108. package/agentvibes.org/.claude/journal/2025-10-07.html +0 -373
  109. package/agentvibes.org/.claude/journal/index.html +0 -91
  110. package/agentvibes.org/.claude/output-styles/agent-vibes.md +0 -203
  111. package/agentvibes.org/.claude/personalities/angry.md +0 -17
  112. package/agentvibes.org/.claude/personalities/annoying.md +0 -17
  113. package/agentvibes.org/.claude/personalities/crass.md +0 -17
  114. package/agentvibes.org/.claude/personalities/dramatic.md +0 -17
  115. package/agentvibes.org/.claude/personalities/dry-humor.md +0 -53
  116. package/agentvibes.org/.claude/personalities/flirty.md +0 -23
  117. package/agentvibes.org/.claude/personalities/funny.md +0 -17
  118. package/agentvibes.org/.claude/personalities/grandpa.md +0 -35
  119. package/agentvibes.org/.claude/personalities/millennial.md +0 -17
  120. package/agentvibes.org/.claude/personalities/moody.md +0 -17
  121. package/agentvibes.org/.claude/personalities/normal.md +0 -19
  122. package/agentvibes.org/.claude/personalities/pirate.md +0 -17
  123. package/agentvibes.org/.claude/personalities/poetic.md +0 -17
  124. package/agentvibes.org/.claude/personalities/professional.md +0 -17
  125. package/agentvibes.org/.claude/personalities/robot.md +0 -17
  126. package/agentvibes.org/.claude/personalities/sarcastic.md +0 -41
  127. package/agentvibes.org/.claude/personalities/sassy.md +0 -17
  128. package/agentvibes.org/.claude/personalities/surfer-dude.md +0 -17
  129. package/agentvibes.org/.claude/personalities/zen.md +0 -17
  130. package/agentvibes.org/.claude/piper-voices-dir.txt +0 -1
  131. package/agentvibes.org/.claude/plugins/bmad-voices.md +0 -42
  132. package/agentvibes.org/.claude/tts-provider.txt +0 -1
  133. package/agentvibes.org/.mcp-minimal.json +0 -60
  134. package/agentvibes.org/CHANGELOG.md +0 -56
  135. package/agentvibes.org/README.md +0 -93
  136. package/agentvibes.org/app/(auth)/layout.tsx +0 -15
  137. package/agentvibes.org/app/(auth)/reset-password/page.tsx +0 -45
  138. package/agentvibes.org/app/(auth)/signin/page.tsx +0 -82
  139. package/agentvibes.org/app/(auth)/signup/page.tsx +0 -104
  140. package/agentvibes.org/app/(default)/blog/[slug]/page.tsx +0 -128
  141. package/agentvibes.org/app/(default)/blog/page.tsx +0 -95
  142. package/agentvibes.org/app/(default)/layout.tsx +0 -31
  143. package/agentvibes.org/app/(default)/page.tsx +0 -20
  144. package/agentvibes.org/app/api/hello/route.ts +0 -3
  145. package/agentvibes.org/app/css/additional-styles/theme.css +0 -82
  146. package/agentvibes.org/app/css/additional-styles/utility-patterns.css +0 -55
  147. package/agentvibes.org/app/css/style.css +0 -100
  148. package/agentvibes.org/app/layout.tsx +0 -63
  149. package/agentvibes.org/components/code-block.tsx +0 -27
  150. package/agentvibes.org/components/cta.tsx +0 -58
  151. package/agentvibes.org/components/features.tsx +0 -256
  152. package/agentvibes.org/components/hero-home.tsx +0 -133
  153. package/agentvibes.org/components/mdx-components.tsx +0 -128
  154. package/agentvibes.org/components/modal-video.tsx +0 -137
  155. package/agentvibes.org/components/page-illustration.tsx +0 -55
  156. package/agentvibes.org/components/spotlight.tsx +0 -77
  157. package/agentvibes.org/components/testimonials.tsx +0 -282
  158. package/agentvibes.org/components/ui/footer.tsx +0 -82
  159. package/agentvibes.org/components/ui/header.tsx +0 -68
  160. package/agentvibes.org/components/ui/logo.tsx +0 -10
  161. package/agentvibes.org/components/workflows.tsx +0 -176
  162. package/agentvibes.org/content/blog/discovering-new-piper-voices.mdx +0 -253
  163. package/agentvibes.org/content/blog/getting-started-agentvibes.mdx +0 -228
  164. package/agentvibes.org/content/blog/introducing-agentvibes-v2.mdx +0 -250
  165. package/agentvibes.org/content/blog/language-learning-with-agentvibes.mdx +0 -142
  166. package/agentvibes.org/content/blog/voice-personalities-guide.mdx +0 -119
  167. package/agentvibes.org/lib/blog.ts +0 -73
  168. package/agentvibes.org/next.config.js +0 -6
  169. package/agentvibes.org/package-lock.json +0 -4285
  170. package/agentvibes.org/package.json +0 -40
  171. package/agentvibes.org/pnpm-lock.yaml +0 -1141
  172. package/agentvibes.org/postcss.config.js +0 -5
  173. package/agentvibes.org/public/audio/02-sarcastic.mp3 +0 -0
  174. package/agentvibes.org/public/audio/03-angry.mp3 +0 -0
  175. package/agentvibes.org/public/audio/04-grandpa.mp3 +0 -0
  176. package/agentvibes.org/public/audio/05-sarcastic-example2.mp3 +0 -0
  177. package/agentvibes.org/public/audio/french-rachel.mp3 +0 -0
  178. package/agentvibes.org/public/audio/piper-voices/speaker_0_Cori_Samuel.wav +0 -0
  179. package/agentvibes.org/public/audio/piper-voices/speaker_10_Steve_C.wav +0 -0
  180. package/agentvibes.org/public/audio/piper-voices/speaker_11_Owlivia.wav +0 -0
  181. package/agentvibes.org/public/audio/piper-voices/speaker_12_Paul_Hampton.wav +0 -0
  182. package/agentvibes.org/public/audio/piper-voices/speaker_13_Jennifer_Dorr.wav +0 -0
  183. package/agentvibes.org/public/audio/piper-voices/speaker_14_Emily_Cripps.wav +0 -0
  184. package/agentvibes.org/public/audio/piper-voices/speaker_15_Martin_Clifton.wav +0 -0
  185. package/agentvibes.org/public/audio/piper-voices/speaker_1_Kara_Shallenberg.wav +0 -0
  186. package/agentvibes.org/public/audio/piper-voices/speaker_2_Kristin_Hughes.wav +0 -0
  187. package/agentvibes.org/public/audio/piper-voices/speaker_3_Maria_Kasper.wav +0 -0
  188. package/agentvibes.org/public/audio/piper-voices/speaker_4_Mike_Pelton.wav +0 -0
  189. package/agentvibes.org/public/audio/piper-voices/speaker_5_Mark_Nelson.wav +0 -0
  190. package/agentvibes.org/public/audio/piper-voices/speaker_6_Michael_Scherer.wav +0 -0
  191. package/agentvibes.org/public/audio/piper-voices/speaker_7_James_K_White.wav +0 -0
  192. package/agentvibes.org/public/audio/piper-voices/speaker_8_Rose_Ibex.wav +0 -0
  193. package/agentvibes.org/public/audio/piper-voices/speaker_9_progressingamerica.wav +0 -0
  194. package/agentvibes.org/public/audio/spanish-antoni.mp3 +0 -0
  195. package/agentvibes.org/public/favicon.ico +0 -0
  196. package/agentvibes.org/public/fonts/nacelle-italic.woff2 +0 -0
  197. package/agentvibes.org/public/fonts/nacelle-regular.woff2 +0 -0
  198. package/agentvibes.org/public/fonts/nacelle-semibold.woff2 +0 -0
  199. package/agentvibes.org/public/fonts/nacelle-semibolditalic.woff2 +0 -0
  200. package/agentvibes.org/public/images/blurred-shape-gray.svg +0 -1
  201. package/agentvibes.org/public/images/blurred-shape.svg +0 -1
  202. package/agentvibes.org/public/images/client-logo-01.svg +0 -1
  203. package/agentvibes.org/public/images/client-logo-02.svg +0 -1
  204. package/agentvibes.org/public/images/client-logo-03.svg +0 -1
  205. package/agentvibes.org/public/images/client-logo-04.svg +0 -1
  206. package/agentvibes.org/public/images/client-logo-05.svg +0 -1
  207. package/agentvibes.org/public/images/client-logo-06.svg +0 -1
  208. package/agentvibes.org/public/images/client-logo-07.svg +0 -1
  209. package/agentvibes.org/public/images/client-logo-08.svg +0 -1
  210. package/agentvibes.org/public/images/client-logo-09.svg +0 -1
  211. package/agentvibes.org/public/images/features.png +0 -0
  212. package/agentvibes.org/public/images/footer-illustration.svg +0 -1
  213. package/agentvibes.org/public/images/hero-image-01.jpg +0 -0
  214. package/agentvibes.org/public/images/logo.svg +0 -1
  215. package/agentvibes.org/public/images/page-illustration.svg +0 -1
  216. package/agentvibes.org/public/images/secondary-illustration.svg +0 -1
  217. package/agentvibes.org/public/images/testimonial-01.jpg +0 -0
  218. package/agentvibes.org/public/images/testimonial-02.jpg +0 -0
  219. package/agentvibes.org/public/images/testimonial-03.jpg +0 -0
  220. package/agentvibes.org/public/images/testimonial-04.jpg +0 -0
  221. package/agentvibes.org/public/images/testimonial-05.jpg +0 -0
  222. package/agentvibes.org/public/images/testimonial-06.jpg +0 -0
  223. package/agentvibes.org/public/images/testimonial-07.jpg +0 -0
  224. package/agentvibes.org/public/images/testimonial-08.jpg +0 -0
  225. package/agentvibes.org/public/images/testimonial-09.jpg +0 -0
  226. package/agentvibes.org/public/images/workflow-01.png +0 -0
  227. package/agentvibes.org/public/images/workflow-02.png +0 -0
  228. package/agentvibes.org/public/images/workflow-03.png +0 -0
  229. package/agentvibes.org/public/videos/video.mp4 +0 -0
  230. package/agentvibes.org/tsconfig.json +0 -28
  231. package/agentvibes.org/utils/useMasonry.tsx +0 -67
  232. package/agentvibes.org/utils/useMousePosition.tsx +0 -27
  233. package/docs/bryce-beattie-voice-licensing.md +0 -131
@@ -1,443 +0,0 @@
1
- #!/bin/bash
2
- # Language Learning Mode Manager for AgentVibes
3
- # Handles dual-language TTS for language learning
4
-
5
- set -e
6
-
7
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8
- PROJECT_DIR="$SCRIPT_DIR/../.."
9
-
10
- # Configuration files (project-local first, then global fallback)
11
- MAIN_LANG_FILE="$PROJECT_DIR/.claude/tts-main-language.txt"
12
- TARGET_LANG_FILE="$PROJECT_DIR/.claude/tts-target-language.txt"
13
- TARGET_VOICE_FILE="$PROJECT_DIR/.claude/tts-target-voice.txt"
14
- LEARN_MODE_FILE="$PROJECT_DIR/.claude/tts-learn-mode.txt"
15
-
16
- GLOBAL_MAIN_LANG_FILE="$HOME/.claude/tts-main-language.txt"
17
- GLOBAL_TARGET_LANG_FILE="$HOME/.claude/tts-target-language.txt"
18
- GLOBAL_TARGET_VOICE_FILE="$HOME/.claude/tts-target-voice.txt"
19
- GLOBAL_LEARN_MODE_FILE="$HOME/.claude/tts-learn-mode.txt"
20
-
21
- # Colors
22
- GREEN='\033[0;32m'
23
- YELLOW='\033[1;33m'
24
- BLUE='\033[0;34m'
25
- NC='\033[0m'
26
-
27
- # Get main language
28
- get_main_language() {
29
- if [[ -f "$MAIN_LANG_FILE" ]]; then
30
- cat "$MAIN_LANG_FILE"
31
- elif [[ -f "$GLOBAL_MAIN_LANG_FILE" ]]; then
32
- cat "$GLOBAL_MAIN_LANG_FILE"
33
- else
34
- echo "english"
35
- fi
36
- }
37
-
38
- # Set main language
39
- set_main_language() {
40
- local language="$1"
41
- if [[ -z "$language" ]]; then
42
- echo -e "${YELLOW}Usage: learn-manager.sh set-main-language <language>${NC}"
43
- exit 1
44
- fi
45
-
46
- mkdir -p "$PROJECT_DIR/.claude"
47
- echo "$language" > "$MAIN_LANG_FILE"
48
- echo -e "${GREEN}✓${NC} Main language set to: $language"
49
- }
50
-
51
- # Get target language
52
- get_target_language() {
53
- if [[ -f "$TARGET_LANG_FILE" ]]; then
54
- cat "$TARGET_LANG_FILE"
55
- elif [[ -f "$GLOBAL_TARGET_LANG_FILE" ]]; then
56
- cat "$GLOBAL_TARGET_LANG_FILE"
57
- else
58
- echo ""
59
- fi
60
- }
61
-
62
- # Get greeting message for a language
63
- get_greeting_for_language() {
64
- local language="$1"
65
-
66
- case "${language,,}" in
67
- spanish|español)
68
- echo "¡Hola! Soy tu profesor de español. ¡Vamos a aprender juntos!"
69
- ;;
70
- french|français)
71
- echo "Bonjour! Je suis votre professeur de français. Apprenons ensemble!"
72
- ;;
73
- german|deutsch)
74
- echo "Hallo! Ich bin dein Deutschlehrer. Lass uns zusammen lernen!"
75
- ;;
76
- italian|italiano)
77
- echo "Ciao! Sono il tuo insegnante di italiano. Impariamo insieme!"
78
- ;;
79
- portuguese|português)
80
- echo "Olá! Sou seu professor de português. Vamos aprender juntos!"
81
- ;;
82
- chinese|中文|mandarin)
83
- echo "你好!我是你的中文老师。让我们一起学习吧!"
84
- ;;
85
- japanese|日本語)
86
- echo "こんにちは!私はあなたの日本語の先生です。一緒に勉強しましょう!"
87
- ;;
88
- korean|한국어)
89
- echo "안녕하세요! 저는 당신의 한국어 선생님입니다. 함께 배워봅시다!"
90
- ;;
91
- russian|русский)
92
- echo "Здравствуйте! Я ваш учитель русского языка. Давайте учиться вместе!"
93
- ;;
94
- arabic|العربية)
95
- echo "مرحبا! أنا معلمك للغة العربية. دعونا نتعلم معا!"
96
- ;;
97
- hindi|हिन्दी)
98
- echo "नमस्ते! मैं आपका हिंदी शिक्षक हूं। आइए साथ में सीखें!"
99
- ;;
100
- dutch|nederlands)
101
- echo "Hallo! Ik ben je Nederlandse leraar. Laten we samen leren!"
102
- ;;
103
- polish|polski)
104
- echo "Cześć! Jestem twoim nauczycielem polskiego. Uczmy się razem!"
105
- ;;
106
- turkish|türkçe)
107
- echo "Merhaba! Ben Türkçe öğretmeninizim. Birlikte öğrenelim!"
108
- ;;
109
- swedish|svenska)
110
- echo "Hej! Jag är din svenskalärare. Låt oss lära tillsammans!"
111
- ;;
112
- *)
113
- echo "Hello! I am your language teacher. Let's learn together!"
114
- ;;
115
- esac
116
- }
117
-
118
- # Set target language
119
- set_target_language() {
120
- local language="$1"
121
- if [[ -z "$language" ]]; then
122
- echo -e "${YELLOW}Usage: learn-manager.sh set-target-language <language>${NC}"
123
- exit 1
124
- fi
125
-
126
- mkdir -p "$PROJECT_DIR/.claude"
127
- echo "$language" > "$TARGET_LANG_FILE"
128
- echo -e "${GREEN}✓${NC} Target language set to: $language"
129
-
130
- # Automatically set the recommended voice for this language
131
- local recommended_voice=$(get_recommended_voice_for_language "$language")
132
- if [[ -n "$recommended_voice" ]]; then
133
- echo "$recommended_voice" > "$TARGET_VOICE_FILE"
134
- echo -e "${GREEN}✓${NC} Target voice automatically set to: ${YELLOW}$recommended_voice${NC}"
135
-
136
- # Detect provider for display
137
- local provider=""
138
- if [[ -f "$PROJECT_DIR/.claude/tts-provider.txt" ]]; then
139
- provider=$(cat "$PROJECT_DIR/.claude/tts-provider.txt")
140
- elif [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
141
- provider=$(cat "$HOME/.claude/tts-provider.txt")
142
- else
143
- provider="elevenlabs"
144
- fi
145
- echo -e " (for ${GREEN}$provider${NC} TTS)"
146
- echo ""
147
-
148
- # Greet user in the target language with the target voice
149
- local greeting=$(get_greeting_for_language "$language")
150
- echo -e "${BLUE}🎓${NC} Your language teacher says:"
151
-
152
- # Check if we're using Piper and if the voice is available
153
- if [[ "$provider" == "piper" ]]; then
154
- # Quick check: does the voice file exist?
155
- local voice_dir="${HOME}/.claude/piper-voices"
156
- if [[ -f "${voice_dir}/${recommended_voice}.onnx" ]]; then
157
- # Voice exists, play greeting in background
158
- nohup "$SCRIPT_DIR/play-tts.sh" "$greeting" "$recommended_voice" >/dev/null 2>&1 &
159
- else
160
- echo -e "${YELLOW} (Voice not yet downloaded - greeting will play after first download)${NC}"
161
- fi
162
- else
163
- # ElevenLabs - just play it in background
164
- nohup "$SCRIPT_DIR/play-tts.sh" "$greeting" "$recommended_voice" >/dev/null 2>&1 &
165
- fi
166
- else
167
- # Fallback to suggestion if auto-set failed
168
- suggest_voice_for_language "$language"
169
- fi
170
- }
171
-
172
- # Get recommended voice for a language (returns voice string, no output)
173
- get_recommended_voice_for_language() {
174
- local language="$1"
175
- local recommended_voice=""
176
- local provider=""
177
-
178
- # Detect active provider
179
- if [[ -f "$PROJECT_DIR/.claude/tts-provider.txt" ]]; then
180
- provider=$(cat "$PROJECT_DIR/.claude/tts-provider.txt")
181
- elif [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
182
- provider=$(cat "$HOME/.claude/tts-provider.txt")
183
- else
184
- provider="elevenlabs" # Default
185
- fi
186
-
187
- # Source language manager and get provider-specific voice
188
- if [[ -f "$SCRIPT_DIR/language-manager.sh" ]]; then
189
- source "$SCRIPT_DIR/language-manager.sh" 2>/dev/null
190
- recommended_voice=$(get_voice_for_language "$language" "$provider" 2>/dev/null)
191
- fi
192
-
193
- # Fallback to hardcoded suggestions if function failed
194
- if [[ -z "$recommended_voice" ]]; then
195
- case "${language,,}" in
196
- spanish|español)
197
- recommended_voice=$([ "$provider" = "piper" ] && echo "es_ES-davefx-medium" || echo "Antoni")
198
- ;;
199
- french|français)
200
- recommended_voice=$([ "$provider" = "piper" ] && echo "fr_FR-siwis-medium" || echo "Rachel")
201
- ;;
202
- german|deutsch)
203
- recommended_voice=$([ "$provider" = "piper" ] && echo "de_DE-thorsten-medium" || echo "Domi")
204
- ;;
205
- italian|italiano)
206
- recommended_voice=$([ "$provider" = "piper" ] && echo "it_IT-riccardo-x_low" || echo "Bella")
207
- ;;
208
- portuguese|português)
209
- recommended_voice=$([ "$provider" = "piper" ] && echo "pt_BR-faber-medium" || echo "Matilda")
210
- ;;
211
- chinese|中文|mandarin)
212
- recommended_voice=$([ "$provider" = "piper" ] && echo "zh_CN-huayan-medium" || echo "Amy")
213
- ;;
214
- *)
215
- recommended_voice=$([ "$provider" = "piper" ] && echo "en_US-lessac-medium" || echo "Antoni")
216
- ;;
217
- esac
218
- fi
219
-
220
- echo "$recommended_voice"
221
- }
222
-
223
- # Suggest voice based on target language (displays suggestion message)
224
- suggest_voice_for_language() {
225
- local language="$1"
226
- local suggested_voice=$(get_recommended_voice_for_language "$language")
227
-
228
- # Detect provider for display
229
- local provider=""
230
- if [[ -f "$PROJECT_DIR/.claude/tts-provider.txt" ]]; then
231
- provider=$(cat "$PROJECT_DIR/.claude/tts-provider.txt")
232
- elif [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
233
- provider=$(cat "$HOME/.claude/tts-provider.txt")
234
- else
235
- provider="elevenlabs"
236
- fi
237
-
238
- echo ""
239
- echo -e "${BLUE}💡 Tip:${NC} For $language (using ${GREEN}$provider${NC} TTS), we recommend: ${YELLOW}$suggested_voice${NC}"
240
- echo -e " Set it with: ${YELLOW}/agent-vibes:target-voice $suggested_voice${NC}"
241
- }
242
-
243
- # Get target voice
244
- get_target_voice() {
245
- if [[ -f "$TARGET_VOICE_FILE" ]]; then
246
- cat "$TARGET_VOICE_FILE"
247
- elif [[ -f "$GLOBAL_TARGET_VOICE_FILE" ]]; then
248
- cat "$GLOBAL_TARGET_VOICE_FILE"
249
- else
250
- echo ""
251
- fi
252
- }
253
-
254
- # Set target voice
255
- set_target_voice() {
256
- local voice="$1"
257
- if [[ -z "$voice" ]]; then
258
- echo -e "${YELLOW}Usage: learn-manager.sh set-target-voice <voice>${NC}"
259
- exit 1
260
- fi
261
-
262
- mkdir -p "$PROJECT_DIR/.claude"
263
- echo "$voice" > "$TARGET_VOICE_FILE"
264
- echo -e "${GREEN}✓${NC} Target voice set to: $voice"
265
- }
266
-
267
- # Check if learning mode is enabled
268
- is_learn_mode_enabled() {
269
- if [[ -f "$LEARN_MODE_FILE" ]]; then
270
- local mode=$(cat "$LEARN_MODE_FILE")
271
- [[ "$mode" == "ON" ]]
272
- elif [[ -f "$GLOBAL_LEARN_MODE_FILE" ]]; then
273
- local mode=$(cat "$GLOBAL_LEARN_MODE_FILE")
274
- [[ "$mode" == "ON" ]]
275
- else
276
- return 1
277
- fi
278
- }
279
-
280
- # Enable learning mode
281
- enable_learn_mode() {
282
- mkdir -p "$PROJECT_DIR/.claude"
283
- echo "ON" > "$LEARN_MODE_FILE"
284
- echo -e "${GREEN}✓${NC} Language learning mode: ${GREEN}ENABLED${NC}"
285
- echo ""
286
-
287
- # Auto-set target voice if target language is set but voice is not
288
- local target_lang=$(get_target_language)
289
- local target_voice=$(get_target_voice)
290
- local voice_was_set=false
291
-
292
- if [[ -n "$target_lang" ]] && [[ -z "$target_voice" ]]; then
293
- echo -e "${BLUE}ℹ${NC} Auto-configuring voice for $target_lang..."
294
- local recommended_voice=$(get_recommended_voice_for_language "$target_lang")
295
- if [[ -n "$recommended_voice" ]]; then
296
- echo "$recommended_voice" > "$TARGET_VOICE_FILE"
297
- target_voice="$recommended_voice"
298
- echo -e "${GREEN}✓${NC} Target voice automatically set to: ${YELLOW}$recommended_voice${NC}"
299
-
300
- # Detect provider for display
301
- local provider=""
302
- if [[ -f "$PROJECT_DIR/.claude/tts-provider.txt" ]]; then
303
- provider=$(cat "$PROJECT_DIR/.claude/tts-provider.txt")
304
- elif [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
305
- provider=$(cat "$HOME/.claude/tts-provider.txt")
306
- else
307
- provider="elevenlabs"
308
- fi
309
- echo -e " (for ${GREEN}$provider${NC} TTS)"
310
- echo ""
311
- voice_was_set=true
312
- fi
313
- fi
314
-
315
- show_status
316
-
317
- # Greet user with language teacher if everything is configured
318
- if [[ -n "$target_lang" ]] && [[ -n "$target_voice" ]]; then
319
- echo ""
320
- local greeting=$(get_greeting_for_language "$target_lang")
321
- echo -e "${BLUE}🎓${NC} Your language teacher says:"
322
-
323
- # Detect provider
324
- local provider=""
325
- if [[ -f "$PROJECT_DIR/.claude/tts-provider.txt" ]]; then
326
- provider=$(cat "$PROJECT_DIR/.claude/tts-provider.txt")
327
- elif [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
328
- provider=$(cat "$HOME/.claude/tts-provider.txt")
329
- else
330
- provider="elevenlabs"
331
- fi
332
-
333
- # Check if we're using Piper and if the voice is available
334
- if [[ "$provider" == "piper" ]]; then
335
- # Quick check: does the voice file exist?
336
- local voice_dir="${HOME}/.claude/piper-voices"
337
- if [[ -f "${voice_dir}/${target_voice}.onnx" ]]; then
338
- # Voice exists, play greeting in background
339
- nohup "$SCRIPT_DIR/play-tts.sh" "$greeting" "$target_voice" >/dev/null 2>&1 &
340
- else
341
- echo -e "${YELLOW} (Voice not yet downloaded - greeting will play after first download)${NC}"
342
- fi
343
- else
344
- # ElevenLabs - just play it in background
345
- nohup "$SCRIPT_DIR/play-tts.sh" "$greeting" "$target_voice" >/dev/null 2>&1 &
346
- fi
347
- fi
348
- }
349
-
350
- # Disable learning mode
351
- disable_learn_mode() {
352
- mkdir -p "$PROJECT_DIR/.claude"
353
- echo "OFF" > "$LEARN_MODE_FILE"
354
- echo -e "${GREEN}✓${NC} Language learning mode: ${YELLOW}DISABLED${NC}"
355
- }
356
-
357
- # Show learning mode status
358
- show_status() {
359
- local main_lang=$(get_main_language)
360
- local target_lang=$(get_target_language)
361
- local target_voice=$(get_target_voice)
362
- local learn_mode="OFF"
363
-
364
- if is_learn_mode_enabled; then
365
- learn_mode="ON"
366
- fi
367
-
368
- echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
369
- echo -e "${BLUE} Language Learning Mode Status${NC}"
370
- echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
371
- echo ""
372
- echo -e " ${BLUE}Learning Mode:${NC} $(if [[ "$learn_mode" == "ON" ]]; then echo -e "${GREEN}ENABLED${NC}"; else echo -e "${YELLOW}DISABLED${NC}"; fi)"
373
- echo -e " ${BLUE}Main Language:${NC} $main_lang"
374
- echo -e " ${BLUE}Target Language:${NC} ${target_lang:-"(not set)"}"
375
- echo -e " ${BLUE}Target Voice:${NC} ${target_voice:-"(not set)"}"
376
- echo ""
377
-
378
- if [[ "$learn_mode" == "ON" ]]; then
379
- if [[ -z "$target_lang" ]]; then
380
- echo -e " ${YELLOW}⚠${NC} Please set a target language: ${YELLOW}/agent-vibes:target <language>${NC}"
381
- fi
382
- if [[ -z "$target_voice" ]]; then
383
- echo -e " ${YELLOW}⚠${NC} Please set a target voice: ${YELLOW}/agent-vibes:target-voice <voice>${NC}"
384
- fi
385
-
386
- if [[ -n "$target_lang" ]] && [[ -n "$target_voice" ]]; then
387
- echo -e " ${GREEN}✓${NC} All set! TTS will speak in both languages."
388
- echo ""
389
- echo -e " ${BLUE}How it works:${NC}"
390
- echo -e " 1. First: Speak in ${BLUE}$main_lang${NC} (your current voice)"
391
- echo -e " 2. Then: Speak in ${BLUE}$target_lang${NC} ($target_voice voice)"
392
- fi
393
- else
394
- echo -e " ${BLUE}💡 Tip:${NC} Enable learning mode with: ${YELLOW}/agent-vibes:learn${NC}"
395
- fi
396
-
397
- echo ""
398
- echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
399
- }
400
-
401
- # Main command handler
402
- case "${1:-}" in
403
- get-main-language)
404
- get_main_language
405
- ;;
406
- set-main-language)
407
- set_main_language "$2"
408
- ;;
409
- get-target-language)
410
- get_target_language
411
- ;;
412
- set-target-language)
413
- set_target_language "$2"
414
- ;;
415
- get-target-voice)
416
- get_target_voice
417
- ;;
418
- set-target-voice)
419
- set_target_voice "$2"
420
- ;;
421
- is-enabled)
422
- if is_learn_mode_enabled; then
423
- echo "ON"
424
- exit 0
425
- else
426
- echo "OFF"
427
- exit 1
428
- fi
429
- ;;
430
- enable)
431
- enable_learn_mode
432
- ;;
433
- disable)
434
- disable_learn_mode
435
- ;;
436
- status)
437
- show_status
438
- ;;
439
- *)
440
- echo "Usage: learn-manager.sh {get-main-language|set-main-language|get-target-language|set-target-language|get-target-voice|set-target-voice|is-enabled|enable|disable|status}"
441
- exit 1
442
- ;;
443
- esac