Skip to content

A basic snippet of code that uses Google's gTTS API to convert text to speech. Go on. Play Around with it.

Notifications You must be signed in to change notification settings

geekquad/Text-to-Speech.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Text-to-Speech.

A basic snippet of code that uses Google's gTTS API to convert text to speech. Go on. Play Around with it. It allows unlimited lengths to be spoken by tokenizing long sentences where the speech would naturally pause.

Be sure to pip install gTTS api before using it.

To install, go to the command prompt and type this:

pip install gTTS

Supported Languages

* 'af' : 'Afrikaans'
* 'sq' : 'Albanian'
* 'ar' : 'Arabic'
* 'hy' : 'Armenian'
* 'bn' : 'Bengali'
* 'ca' : 'Catalan'
* 'zh' : 'Chinese'
* 'zh-cn' : 'Chinese (Mandarin/China)'
* 'zh-tw' : 'Chinese (Mandarin/Taiwan)'
* 'zh-yue' : 'Chinese (Cantonese)'
* 'hr' : 'Croatian'
* 'cs' : 'Czech'
* 'da' : 'Danish'
* 'nl' : 'Dutch'
* 'en' : 'English'
* 'en-au' : 'English (Australia)'
* 'en-uk' : 'English (United Kingdom)'
* 'en-us' : 'English (United States)'
* 'eo' : 'Esperanto'
* 'fi' : 'Finnish'
* 'fr' : 'French'
* 'de' : 'German'
* 'el' : 'Greek'
* 'hi' : 'Hindi'
* 'hu' : 'Hungarian'
* 'is' : 'Icelandic'
* 'id' : 'Indonesian'
* 'it' : 'Italian'
* 'ja' : 'Japanese'
* 'km' : 'Khmer (Cambodian)'
* 'ko' : 'Korean'
* 'la' : 'Latin'
* 'lv' : 'Latvian'
* 'mk' : 'Macedonian'
* 'no' : 'Norwegian'
* 'pl' : 'Polish'
* 'pt' : 'Portuguese'
* 'ro' : 'Romanian'
* 'ru' : 'Russian'
* 'sr' : 'Serbian'
* 'si' : 'Sinhala'
* 'sk' : 'Slovak'
* 'es' : 'Spanish'
* 'es-es' : 'Spanish (Spain)'
* 'es-us' : 'Spanish (United States)'
* 'sw' : 'Swahili'
* 'sv' : 'Swedish'
* 'ta' : 'Tamil'
* 'th' : 'Thai'
* 'tr' : 'Turkish'
* 'uk' : 'Ukrainian'
* 'vi' : 'Vietnamese'
* 'cy' : 'Welsh'

About

A basic snippet of code that uses Google's gTTS API to convert text to speech. Go on. Play Around with it.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published