TEXT TO AUDIO FILE using Popclip

Hello friends, has any one developped an extention to convert outlined text to audio (mp3 or AIFF). I use the service option but it would be great to do iy with Popclip. Thank you.

There’s Say of course.

And there’s this one – if you are techie enough you could modify it to your needs:

Do you want spoken audio or to save the file?

Hello Nick, I want to save the file (and if I could choose the default folder at install time it woud be great). I use the say command a lot also but can"t save… Thank you, Yves

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

1 Like

Great Thank you very much.

In case you just tried it in the last few minutes, try again because there was a bug :slight_smile: I edited it again