txt2mp3mac is a free and AppleScript based application that will help you convert a given text file to mp3.
txt2mp3mac can prove very useful for creating audiobooks from ebooks, listening to lecture notes on the go, etc.
txt2mp3mac employs the default Mac OS X speech synthesizer for text-to-speech and a bundled universal binary of LAME v3.98 for mp3 conversion. How it works
The default Mac OS X speech synthesizer will generate uncompressed AIFF files that can get rather large if the given text file is long (ex. a book).
To avoid this, the applescript processes each paragraph in the text individually: reading a given paragraph to AIFF, immediately converting to a temporary mp3 file and deleting the AIFF file before moving on to reading the next paragraph.
After all paragraphs are read, the temporary mp3 files are concatenated into a single final mp3 file and the temporary files are deleted.