AppleScript to audio I want to save the following spoken text to an audiofile that I can play on my iPod (so .mp3 or something).

say "the company [[slnc 1200]]" using "Alex"
say "une entreprise [[slnc 1200]]" using "Thomas"
say "a farm [[slnc 1500]]" using "Alex"
say "une ferme [[slnc 1200]]" using "Thomas"


So everything that my mac says during the run of this AppleScript should be saved in one audiofile. I don't want 4 different audiofiles, instead, I would like to have one (big) audiofile with all the audio. Is this possible?

Thanks in advance.
You sure can! Try this:

say "the company [[slnc 1200]]" using "Alex" saving to ((path to home folder as string) &amp; "TheCompany.aiff")


Note that you have to use the AIFF format, which iPods do support. This will save it in your home directory.

You have to install FFMPEG for the final part of this script. You may have to install the developer tools first. Run this command in Terminal to check:

xcode-select --install

Once that's completed, you should install a package manager for FFMPEG. I personally use MacPorts, so that's what these instructions are for. Install MacPorts from here, picking the correct version for your OS. Once it's installed, run sudo port selfupdate &amp;&amp; sudo port install ffmpeg in the Terminal, and enter your password. Once that's complete, this AppleScript should now function:

global file_index
global temp_files
set file_index to 0
set temp_files to {}
set finished_filename to "result.aiff"

say "the company [[slnc 1200]]" using "Alex" saving to new_temp_file()
say "une entreprise [[slnc 1200]]" using "Thomas" saving to new_temp_file()
say "a farm [[slnc 1500]]" using "Alex" saving to new_temp_file()
say "une ferme [[slnc 1200]]" using "Thomas" saving to new_temp_file()

set final_command to "echo \""
repeat with filename in temp_files
    set final_command to final_command &amp; "file " &amp; POSIX path of filename &amp; "
"
end repeat
set final_command to final_command &amp; "\"|/opt/local/bin/ffmpeg -y -f concat -i - -c copy ~/" &amp; finished_filename
do shell script final_command

#cleanup
repeat with current_file in temp_files
    do shell script "rm " &amp; POSIX path of current_file
end repeat

on new_temp_file()
    set file_index to file_index + 1
    set current_temp_file to ((path to temporary items) as string) &amp; "file" &amp; file_index &amp; ".aiff"
    set temp_files to temp_files &amp; {current_temp_file}
    return current_temp_file
end new_temp_file


This will combine the says in the list to the file you specify in the finished_filename variable. You can add however many "say"s you want, just keep to the same syntax I used (saving to new_temp_file()) and you'll be good to go!