Awesome-Python-Scripts/TTS_Text_to_Speech_Mp3/README.md
Antonio Andrade 1d2de84900
Added "TTS - Text to Speech Mp3" (#248)
* New commit

* Added example file (run.py)

* New commit

* Added 'TTS - Text to Speech Mp3'
2022-02-08 11:56:52 +05:30

743 B

TTS - Text to Speech Mp3

Write spoken mp3 data to a file, a file-like object (bytestring) for further audio manipulation, or stdout. This example uses the Python library gTTS (Google Text-to-Speech), to interface with Google Translate's text-to-speech API.

Installation

$ pip install requirements.txt

Quickstart

>>> from gtts import gTTS
>>> tts = gTTS('hello')
>>> tts.save('hello.mp3')

Disclaimer

gTTS project is not affiliated with Google or Google Cloud. Breaking upstream changes can occur without notice. This project is leveraging the undocumented Google Translate speech functionality and is different from Google Cloud Text-to-Speech.