diff --git a/stt/client/pyproject.toml b/stt/client/pyproject.toml index 20c07d5..4f6d51e 100644 --- a/stt/client/pyproject.toml +++ b/stt/client/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "stt" -version = "0.6.0" +version = "0.6.1" description = "STT — client vocal Jarvis du homelab Funk (voix + HUD, parle au STT-server)" requires-python = ">=3.11" readme = "README.md" diff --git a/stt/client/stt/cli.py b/stt/client/stt/cli.py index b4c6202..c0b130a 100644 --- a/stt/client/stt/cli.py +++ b/stt/client/stt/cli.py @@ -139,7 +139,13 @@ def _running_stt_pids() -> list[int]: continue if not args: continue - if os.path.basename(args[0]) == "stt" and not (utilitaires & set(args)): + # Le chemin du bin `stt` peut être argv[0] (exec direct via shebang) ou un + # token plus loin (lancement pipx : `python -E /…/bin/stt --window app` → + # le `-E` décale le chemin). On cherche un token qui est un *chemin* vers + # `stt` (slash + basename `stt`) — ça écarte le `stt` nu d'un + # `journalctl -u stt` — et on ignore les sous-commandes utilitaires. + is_stt = any("/" in a and os.path.basename(a) == "stt" for a in args) + if is_stt and not (utilitaires & set(args)): pids.append(pid) return pids