'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?


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.)

  • Thanks. I didn't know about /dev/stdout. While not a solution here, it's good to know about for the future. – Chap Jul 15 '12 at 15:39
  • 2
    I 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. – username Jul 15 '12 at 16:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .