Skip to content

Commit

Permalink
added the War and Peace text-to-speech reader
Browse files Browse the repository at this point in the history
  • Loading branch information
j50n committed Feb 7, 2022
1 parent bab62a2 commit 3f37acf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/warandpeace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ uses more memory, but hey - it runs.
zcat ./warandpeace.txt.gz | ./read.ts
```

I've never read _War and Peace_, but now my computer has.
I've never read _War and Peace_, but now my computer has!
10 changes: 6 additions & 4 deletions examples/warandpeace/read.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ const pg = proc.group();
try {
for await (const text of proc.toLines(proc.readerToBytes(Deno.stdin))) {
if (text.trim().length > 0) {
console.log();
console.log(await proc.runner(proc.stringInput(), proc.stringOutput())(pg).run({
cmd: ["fmt", "-w", "80"]
}, text.trim()));
console.log();
console.log(
await proc.runner(proc.stringInput(), proc.stringOutput())(pg).run({
cmd: ["fmt", "-w", "80"],
}, text.trim()),
);
await proc.simpleRunner(pg).run({
cmd: ["spd-say", "-w", "-t", "female3", text.trim()],
});
Expand Down

0 comments on commit 3f37acf

Please sign in to comment.