say
has an option to write to AIFF, so we can make a snippet for this (inspired by Create a new .txt file?):
#!/bin/zsh
# #popclip
# name: Say AIFF
# icon: symbol:waveform
# stdin: text
# options:
# - { identifier: folder, label: Folder, type: string, default value: "~/Documents" }
filename=$(date "+%Y%m%d-%H%M%S").aiff
folder="${POPCLIP_OPTION_FOLDER/#\~/$HOME}"
cat | say -o $folder/$filename
(The above block is an extension snippet — select it then click “Install Extension” in PopClip.)
You can of course modify the script to change the output file folder, name format and change the arguments to say
(to set voice etc.)
Edit: I’ll come back and edit it to set the folder in options