From 1ce7e893283f3a87f5cfbafa2106d4dfdc68016e Mon Sep 17 00:00:00 2001 From: AlexFucuson9 Date: Thu, 16 Jul 2026 20:08:49 +0700 Subject: [PATCH] fix: add creationflags to remaining tts_tool subprocess calls Three subprocess calls in tts_tool.py were missing CREATE_NO_WINDOW: - Line 731: taskkill process tree termination - Line 2015: NeuTTS synthesis call - Line 2094: Piper voice download call All three have stdin=DEVNULL and capture_output=True, so they are non-interactive. windows_hide_flags() is already imported at line 55. --- tools/tts_tool.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/tts_tool.py b/tools/tts_tool.py index 545d72bb6907..cffff0bb8703 100644 --- a/tools/tts_tool.py +++ b/tools/tts_tool.py @@ -734,6 +734,7 @@ def _terminate_command_tts_process_tree(proc: subprocess.Popen) -> None: stderr=subprocess.DEVNULL, timeout=5, stdin=subprocess.DEVNULL, + creationflags=windows_hide_flags(), ) except Exception: proc.kill() @@ -2012,7 +2013,7 @@ def _generate_neutts(text: str, output_path: str, tts_config: Dict[str, Any]) -> "--device", device, ] - result = subprocess.run(cmd, capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL) + result = subprocess.run(cmd, capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL, creationflags=windows_hide_flags()) if result.returncode != 0: stderr = result.stderr.strip() # Filter out the "OK:" line from stderr @@ -2096,6 +2097,7 @@ def _resolve_piper_voice_path(voice: str, download_dir: Path) -> str: "--download-dir", str(download_dir)], capture_output=True, text=True, timeout=300, stdin=subprocess.DEVNULL, + creationflags=windows_hide_flags(), ) except subprocess.TimeoutExpired as exc: raise RuntimeError(