0

For many years I've been using the say command to read back essays I've written. My workflow is

  1. Use say to write out an aiff or WAVE file
  2. Use an audio player like iTunes to playback the file, pausing and rewinding as needed

However, recently the say command started to hang when I used it with an input and output file.

$ ls -lh /tmp/md_to_sayfbfhyf.txt
-rw-r--r--@ 1 alanstorm  wheel   5.8K Jan  5 08:59 /tmp/md_to_sayfbfhyf.txt

$ say -f /tmp/md_to_sayfbfhyf.txt -o output.aiff

This command will hang after writing a little over a MB to the aiff file.

$ ls -lh output.aiff
-rw-r--r--  1 alanstorm  staff   1.1M Jan  5 09:13 output.aiff

After that say will always hang unless I kill speechsynthesisd.

Also, this appears to be a problem with writing the output file -- running just

$ say -f /tmp/md_to_sayfbfhyf.txt

works without issue.

I'm on MacOS: 10.13.4 (High Sierra)

The command works with very small text files that contain a sentence or two -- but files with more than a few paragraphs of text hang. I have not zeroed in on a specific file size or word count.

5
  • Does it fail for all input files or only for some? Does it fail independent of the directory the output gets written to?
    – nohillside
    Jan 5, 2019 at 17:25
  • Ah, which version of macOS are you using?
    – nohillside
    Jan 5, 2019 at 17:26
  • @nohillside It fails independently of the directory used for reading/writing. It does not fail for very small text file, but it does fail for files with more than a few paragraphs of text. I'm on the latest version of High Sierra. (question update to reflect this information) Also -- thank you for your attention! Jan 5, 2019 at 17:40
  • 1
    Yeah, just checked in Mojave, stops after writing 4K of audio. Hmm.
    – nohillside
    Jan 5, 2019 at 17:46
  • @nohillside That's extra odd -- I usually get around 1.1MB of audio information before it hangs. Jan 5, 2019 at 21:45

0

You must log in to answer this question.

Browse other questions tagged .