feat(tts): add --pause flag to control mpv playback
This commit is contained in:
parent
e1033398e9
commit
49c4138a1c
1 changed files with 5 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue