Skip to content

Instantly share code, notes, and snippets.

@mertyildiran
Created March 14, 2016 17:18
Show Gist options
  • Save mertyildiran/e70d4106e32f1a776d41 to your computer and use it in GitHub Desktop.
Save mertyildiran/e70d4106e32f1a776d41 to your computer and use it in GitHub Desktop.
Google TTS API example
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# pip install gTTS
# https://pypi.python.org/pypi/gTTS
from gtts import gTTS
tts = gTTS(text='Hello, how are you today?', lang='en')
tts.save("hello.mp3")
tts2 = gTTS(text='Merhaba, bugün nasılsın?', lang='tr')
tts2.save("merhaba.mp3")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment