gTTS (Google Text-to-Speech)

 gTTS (Google Text-to-Speech)

a Python library and CLI tool to interface with Google Translate text-to-speech API

Features

Customizable speech-specific sentence tokenizer that allows for unlimited lengths of text to be read, all while keeping proper intonation, abbreviations, decimals and more

Customizable text pre-processors which can, for example, provide pronunciation corrections

Installation   $ pip install gTTS

Example  $ gtts-cli 'hello' --output hello.mp3

More

Convert Text to Speech

from gtts import gTTS

import os

mytext = 'Welcome to Python for Engineers,A Complete solution for python programming'

language = 'en'

myobj = gTTS(text=mytext, lang=language, slow=False)

myobj.save('WelcomeMsg.mp3')