Using gtts on the Mac OS to transform text to audio files

As you will probably know, computer voice synthesis is making great progresses in the last years. Google gives us the chance to use his text-to-speech API with Python and gets in a very easy way

This time I will show you the basic usage of the module, but if you search on this site there are interesting examples of code that you can create to make really interesting stuffs and I will continue showing some ideas now and then. So, if you still don’t know how to use this awesome tool, today you have the chance to do it. Here is an example of code to create an audio file out of a text with this module, followed by a video with the live coding of this script. Have fun, I’m sure you will.

P.S.: at the end of this post you will find some links to other posts about this topic.

Other posts about text-to-speech (text-to-mp3) on this blog

From text to mp3 with gtts (reading external file)

Google text-to-speech : example of GUI to create mp3 from text

Google Text to Speech API: how to create mp3 with text in any language

Published by pythonprogramming

Started with basic on the spectrum, loved javascript in the 90ies and python in the 2000, now I am back with python, still making some javascript stuff when needed.