pndurette / gTTS

Python library and CLI tool to interface with Google Translate's text-to-speech API
http://gtts.readthedocs.org/
MIT License
2.27k stars 362 forks source link

Full Language Tags #315

Closed ReversingWithMe closed 1 year ago

ReversingWithMe commented 3 years ago

Language Tags as of Sept 8, 2021

af - Afrikaans sq - Albanian hy - Armenian ar - Arabic bn - Bangla bs - Bosnian bg - Bulgarian my - Burmese ca - Catalan zh-CN - Chinese Simplified zh-TW - Chinese Traditional hr - Croatian cs - Czech da - Danish nl - Dutch en - English eo - Esperanto et - Estonian tl - Filipino fi - Finnish fr - French de - German el - Greek gu - Gujarati hi - Hindi hu - Hungarian is - Icelandic id - Indonesian it - Italian ja - Japanese jw - Javanese kn - Kannada km - Khmer ko - Korean la - Latin lv - Latvian mk - Macedonian ms - Malay ml - Malayalam mr - Marathi ne - Nepali no - Norwegian pl - Polish pt - Portuguese ro - Romanian ru - Russian sr - Serbian si - Sinhala sk - Slovak es - Spanish su - Sudanese sw - Swahili sv - Swedish ta - Tamil te - Telugu th - Thai tr - Turkish uk - Ukranian ur - Urdu vi - Vietnamese cy - Welsh

Some of these have the same voices, one could possibly dump to mp3 and compare the mp3 files for equality.

These would probably need to be checked for stability to make sure not often changed.

langs = ['eo', 'et', 'tl'...]
for lang in langs:
    try:
        myobj = gTTS(text=text, lang=lang, slow=False, lang_check=False)
    except gtts.tts.gTTSError:
        assert(False)
pndurette commented 1 year ago

Thanks for this! The language generator was updated in #369 and will be automated