🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

aiogTTS

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aiogTTS

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

1.1.1
Maintainers
1

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())

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts