Skip to main content

A Python library to interface with Google Translate text-to-speech API

Project description

aiogTTS PyPI version Python versions Build Status

aiogTTS (asynchronous Google Text-to-Speech), a Python library to interface with Google Translate's text-to-speech API. Writes spoken mp3 data to a file or a file-like object (bytestring) for further audiomanipulation.

Original gTTS and gTTS-token


  • 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;
  • Automatic retrieval of supported languages.


$ pip install aiogTTS


import asyncio
from io import BytesIO
from aiogtts import aiogTTS

async def main():
    aiogtts = aiogTTS()
    io = BytesIO()
    await'Привет, мир!', 'audio.mp3', lang='ru')
    await aiogtts.write_to_fp('Hallo!', io, slow=True, lang='de')


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for aiogTTS, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size aiogTTS-1.1.0-py3-none-any.whl (15.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size aiogTTS-1.1.0.tar.gz (12.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page