Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

'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
add comment

1 Answer 1

up vote 5 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
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
add comment

Your Answer

 
discard

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.