Skip to content

Commit

Permalink
Add support for skipping running check
Browse files Browse the repository at this point in the history
  • Loading branch information
LitoMore committed Jun 9, 2024
1 parent 7a7f263 commit 6a5d2cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type SayOptions = {
outputFile?: string;
networkSend?: string;
channels?: number;
skipRunningCheck?: boolean;
};
```

Expand Down
6 changes: 5 additions & 1 deletion source/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ export type SayOptions = {
outputFile?: string;
networkSend?: string;
channels?: number;
skipRunningCheck?: boolean;
};

export async function say(text: string, options: SayOptions = {}) {
await killRunningSay();
if (!options.skipRunningCheck) {
await killRunningSay();
}

const {voice, rate, audioDevice, quality, inputFile, outputFile, networkSend, channels} = options;
try {
await execa(
Expand Down

0 comments on commit 6a5d2cf

Please sign in to comment.