This extremely simple Ruby module extends the String class by adding a to_speech method, so text.to_speech will perform a request to Text-to-Speech API which produces a remote mp3 file that will be downloaded to the current directory (curl needed):
text.to_speech→text.mp3