feat(tts): add --pause flag to control mpv playback

This commit is contained in:
mitchell 2026-06-19 17:35:05 -04:00
parent e1033398e9
commit 49c4138a1c

View file

@ -21,6 +21,8 @@ async function main() {
options: {
wait: { type: "boolean" },
w: { type: "boolean" },
pause: { type: "boolean" },
p: { type: "boolean" },
url: { type: "boolean" },
u: { type: "boolean" },
edit: { type: "boolean" },
@ -31,6 +33,7 @@ async function main() {
});
const waitAndCombine = args.wait ?? args.w;
const pausePlayer = args.pause ?? args.p;
const readURL = args.url ?? args.u;
const editContent = args.edit ?? args.e;
@ -136,7 +139,7 @@ async function main() {
stdin: "ignore",
stdout: "inherit",
stderr: "inherit",
})`mpv ${file}`;
})`mpv${pausePlayer ? " --pause" : ""} ${file}`;
}
}
@ -171,7 +174,7 @@ async function main() {
stdin: "ignore",
stdout: "inherit",
stderr: "inherit",
})`mpv --pause output.wav`;
})`mpv${pausePlayer ? " --pause" : ""} output.wav`;
}
main().catch(handleTopLevel);