mirror of
https://github.com/sortedcord/kokoro-wayland.git
synced 2026-03-07 15:44:07 +05:30
22 lines
624 B
Bash
Executable File
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 &
|