Skip to content

Commit 331b36a

Browse files
taylaandclaude
andcommitted
fix: install kokoro TTS deps with agent-session-tools, warn on fallback
install.sh now installs agent-session-tools with [tts] extras, which includes kokoro-onnx and sounddevice. Previously these were missing from the tool venv, causing silent fallback to macOS say. speak.py now prints a warning when kokoro backend is configured but unavailable, instead of silently falling back. This makes it obvious why voice quality is degraded. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 603376d commit 331b36a

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

packages/agent-session-tools/src/agent_session_tools/speak.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@ def speak(
170170
return
171171

172172
# Fallback chain: kokoro → macos
173+
if backend == "kokoro":
174+
typer.echo(
175+
"⚠ Kokoro TTS not available — falling back to macOS say. "
176+
"Install TTS deps: uv tool install './packages/agent-session-tools[tts]' --force",
177+
err=True,
178+
)
173179
if backend != "kokoro" and _speak_kokoro(text, voice=voice, speed=speed):
174180
return
175181
_speak_macos(text, voice=macos_voice)

scripts/install.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,16 @@ fi
9797
step "Installing CLI tools globally"
9898
for pkg in "${REPO_DIR}"/packages/*/; do
9999
pkg_name=$(basename "$pkg")
100-
uv tool install "$pkg" --editable --force 2>&1 | while read -r line; do
101-
echo " $line"
102-
done
100+
# Include TTS extras for agent-session-tools (kokoro voice output)
101+
if [ "$pkg_name" = "agent-session-tools" ]; then
102+
uv tool install "${pkg}[tts]" --editable --force 2>&1 | while read -r line; do
103+
echo " $line"
104+
done
105+
else
106+
uv tool install "$pkg" --editable --force 2>&1 | while read -r line; do
107+
echo " $line"
108+
done
109+
fi
103110
done
104111
info "CLI tools installed (studyctl, session-export, session-query, session-sync, session-maint, tutor-checkpoint, study-speak)"
105112

0 commit comments

Comments
 (0)