From 4c0e25ad33d63b56017a16ff477850aadbf290a4 Mon Sep 17 00:00:00 2001 From: mitchell Date: Fri, 31 Jul 2026 20:05:04 -0400 Subject: [PATCH 1/2] fix(ttsc): pause flag --- src/tts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tts.ts b/src/tts.ts index e6aab05..5fcf80c 100644 --- a/src/tts.ts +++ b/src/tts.ts @@ -139,7 +139,7 @@ async function main() { stdin: "ignore", stdout: "inherit", stderr: "inherit", - })`mpv${pausePlayer ? " --pause" : ""} ${file}`; + })`mpv ${pausePlayer ? ["--pause"] : []} ${file}`; } } @@ -174,7 +174,7 @@ async function main() { stdin: "ignore", stdout: "inherit", stderr: "inherit", - })`mpv${pausePlayer ? " --pause" : ""} output.wav`; + })`mpv ${pausePlayer ? ["--pause"] : []} output.wav`; } main().catch(handleTopLevel); From 7b173c68f5a5df22930d3efb903a15eb3dd4d6c2 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 18 Aug 2026 21:30:37 -0400 Subject: [PATCH 2/2] chore(tts): suppress stderr output after initial setup --- src/tts.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/tts.ts b/src/tts.ts index 5fcf80c..b7b976a 100644 --- a/src/tts.ts +++ b/src/tts.ts @@ -62,6 +62,14 @@ async function main() { const home = os.homedir(); const cwd = path.join(home, ".ttsc"); + const firstRun = await (async () => { + try { + await fs.access(cwd, fs.constants.F_OK); + return false; + } catch { + return true; + } + })(); if (editContent) { const file = path.join(cwd, "input.txt"); @@ -90,7 +98,7 @@ async function main() { cwd, input, stdout: "pipe", - stderr: "inherit", + stderr: firstRun ? "inherit" : "ignore", })`uv run -- python -u main.py`; if (!waitAndCombine) {