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 - https://github.com/pndurette/gTTS/ (75% of this repo)

Features

  • 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;

Installation

$ pip install aiogTTS

Quickstart

import asyncio
from io import BytesIO
from aiogtts import aiogTTS


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


asyncio.get_event_loop().run_until_complete(main())

Project details


Download files

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

Source Distribution

aiogTTS-1.1.1.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

aiogTTS-1.1.1-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file aiogTTS-1.1.1.tar.gz.

File metadata

  • Download URL: aiogTTS-1.1.1.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for aiogTTS-1.1.1.tar.gz
Algorithm Hash digest
SHA256 4f5e219f86c176c1cc568a8e4ec13d6535ea1d0fc2e9db2bacf7155e8f0e0688
MD5 1aa93be636afba43ad61e12ea6f3d15e
BLAKE2b-256 8605ecc208a30258eccf5d2d45df078130b375ca9838307c51a1748889c1b28b

See more details on using hashes here.

File details

Details for the file aiogTTS-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: aiogTTS-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for aiogTTS-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bbeb972d5fdee5581febf21019a0235aed9172929811c5b773ece2e2601d4499
MD5 616a1510ce82ba6bb0b224e5fb21ffa5
BLAKE2b-256 677eccbf178b306c79e2dc0424ac7b4d729437bb6a207414d17f6c845458cd92

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page