Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 6 down vote accepted

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

share|improve this answer
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
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.