fix(tools): utf-8 decode for STT/TTS command-provider popen_kwargs

Salvaged from PR #45099 — the two popen_kwargs dict sites the #70875
AST sweep missed because the kwargs are built indirectly
(_run_command_stt, _run_command_tts).
This commit is contained in:
Icather
2026-07-24 13:49:16 -07:00
committed by Teknium
parent cc6e8fa757
commit 8516324f84
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -556,6 +556,10 @@ def _run_command_stt(command: str, timeout: float) -> subprocess.CompletedProces
"stdout": subprocess.PIPE,
"stderr": subprocess.PIPE,
"text": True,
# Lossy UTF-8 decode — locale-mismatched bytes from the STT command
# must not raise in the reader threads on non-UTF-8 Windows (#45099).
"encoding": "utf-8",
"errors": "replace",
"env": delegated_child_subprocess_env(),
}
if os.name == "nt":
+4
View File
@@ -782,6 +782,10 @@ def _run_command_tts(command: str, timeout: float) -> subprocess.CompletedProces
"stdout": subprocess.PIPE,
"stderr": subprocess.PIPE,
"text": True,
# Lossy UTF-8 decode — locale-mismatched bytes from the TTS command
# must not raise in the reader threads on non-UTF-8 Windows (#45099).
"encoding": "utf-8",
"errors": "replace",
"env": delegated_child_subprocess_env(),
}
if os.name == "nt":