Files
kokoro-wayland/run.sh
2026-02-04 17:09:36 +05:30

22 lines
624 B
Bash
Executable File

#!/bin/bash
# Path to your project
PROJECT_DIR="$HOME/Clones/kokoro-tts"
# 1. Kill any existing narration process to act as a 'toggle' or 'reset'
# We use pgrep -f to find the specific uv run process
pids=$(pgrep -f "wayland_narrate.py")
if [ -n "$pids" ]; then
kill $pids
# Optional: If you want it to ONLY stop when you hit the key again,
# uncomment the next two lines to exit here.
# echo "Stopped narration."
# exit 0
fi
# 2. Run the narrator using uv
# we use 'nohup' and '&' so the script returns control to your desktop immediately
cd "$PROJECT_DIR" || exit
uv run wayland_narrate.py >/dev/null 2>&1 &