Async interfaces to the official Google Text to Speech API.
Project description
asyncgTTS
Asynchronous interfaces to the official Google Text to Speech API written with aiohttp.
Similar to googleapis/python-texttospeech in concept, but asyncgTTS was designed with asynchronously in mind and is expected to be more performant.
Example
import asyncio
import json
from asyncgTTS import AsyncGTTSSession, ServiceAccount
async def main():
with open("SERVICE_ACCOUNT.JSON") as service_account_json:
service_account_dict = json.load(service_account_json)
service_account = ServiceAccount.from_service_account_dict(service_account_dict)
async with AsyncGTTSSession.from_service_account(service_account) as google_tts:
audio_bytes = await google_tts.synthesize("vine boom")
with open("Hello_world.mp3", "wb") as f:
f.write(audio_bytes)
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
async-gTTS-0.3.0.tar.gz
(6.5 kB
view hashes)
Built Distribution
Close
Hashes for async_gTTS-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68954692cca18d12093bab46c471cd2bf052772efc58428442c52f06678480df |
|
MD5 | 9345d3c785c4e71dfdc96014d4d7e56c |
|
BLAKE2b-256 | 9c8a73b2017709e06d29171a41ccf65df41e5db3df5a990c26227a55c9936f89 |