'say' has both -o and -n arguments for various ways to direct the output, but I don't see any way to simply pipe the output to another command (say, sox). Is this a limitation of say, or is there a basic Unix shell feature that will do this?
1 Answer
It seems impossible. It should have been possible to use -o /dev/stdout
for this, but say
insists on adding a file suffix, which rather ruins that option. I tried getting around that by creating a symlink to /dev/stdout
, but it gives a permission error. (Perhaps this comes from say
opening the output file for both reading and writing (option O_RDWR
) instead of just writing.)
-
1Thanks. I didn't know about /dev/stdout. While not a solution here, it's good to know about for the future.– ChapCommented Jul 15, 2012 at 15:39
-
2I also was interested in piping "say" (well, using its output in a Python program without first saving to a file). I believe Harald is correct as I came to the same conclusion when I checked. I ended up using "espeak" instead, which does allows you to pipe raw wav data. Of course, it's one more thing to install, but it does the job.– usernameCommented Jul 15, 2012 at 16:28