From ed407b49a64c0a5e5622b69e3df16f7a65c978af Mon Sep 17 00:00:00 2001 From: Marius Mutu Date: Sat, 11 Jul 2026 10:02:26 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20US-001=20-=20Setup=20venv-pockettts=20?= =?UTF-8?q?=C8=99i=20pocket-tts.service=20systemd=20unit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - venv separat .venv-pockettts (torch + pocket-tts + keyring), gitignored - tools/pocket_tts_env_launch.sh citește hf_token din keyring, exit non-zero + log clar dacă lipsește - pocket-tts.service (systemd --user) pornește serverul built-in pe 127.0.0.1:7789 prin launcher - gates: /review (manual, diff minimal) PASS, smoke test curl /health 200 + restart test PASS --- .gitignore | 1 + tools/pocket_tts_env_launch.sh | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100755 tools/pocket_tts_env_launch.sh diff --git a/.gitignore b/.gitignore index 565419d..216653a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .venv/ +.venv-pockettts/ venv/ __pycache__/ *.pyc diff --git a/tools/pocket_tts_env_launch.sh b/tools/pocket_tts_env_launch.sh new file mode 100755 index 0000000..82fa439 --- /dev/null +++ b/tools/pocket_tts_env_launch.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +# Launcher for pocket-tts.service — resolves hf_token from keyring (needed to +# download the gated kyutai/pocket-tts weights) and execs the server. +set -uo pipefail + +REPO_ROOT="/home/moltbot/echo-core" +VENV="$REPO_ROOT/.venv-pockettts" + +cd "$REPO_ROOT" + +HF_TOKEN="$(PYTHONPATH="$REPO_ROOT" "$VENV/bin/python3" -c " +from src.credential_store import get_secret +print(get_secret('hf_token') or '') +")" + +if [ -z "$HF_TOKEN" ]; then + echo "[pocket-tts-launch] ERROR: hf_token lipsește din keyring (service echo-core). Setează-l cu: $REPO_ROOT/.venv/bin/python3 -c \"from src.credential_store import set_secret; set_secret('hf_token', '')\"" >&2 + exit 1 +fi + +export HF_TOKEN +exec "$VENV/bin/pocket-tts" serve --host 127.0.0.1 --port 7789