asyncgTTS-0.3.1


توضیحات

Async interfaces to the official Google Text to Speech or easygtts APIs
ویژگی مقدار
سیستم عامل -
نام فایل asyncgTTS-0.3.1
نام asyncgTTS
نسخه کتابخانه 0.3.1
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Gnome-py
ایمیل نویسنده gnome6669.py@gmail.com
آدرس صفحه اصلی https://github.com/gnome-py/asyncgTTS
آدرس اینترنتی https://pypi.org/project/asyncgTTS/
مجوز MIT
# asyncgTTS Asynchronous interfaces to the [official Google Text to Speech](https://cloud.google.com/text-to-speech) or [easygTTS](https://github.com/Gnome-py/easy-gtts-api) APIs written with aiohttp. ## Examples ### asyncgTTS ```python import asyncio from subprocess import PIPE, run import aiohttp import asyncgTTS async def main(): async with aiohttp.ClientSession() as session: gtts = await asyncgTTS.setup(premium=True, session=session, service_account_json_location="SERVICE_ACCOUNT.json") hello_world_ogg = await gtts.get("Hello World", voice_lang=("en-US-Standard-B", "en-us")) hello_world_mp3 = await gtts.get("Hello World", voice_lang=("en-US-Standard-A", "en-us"), ret_type="MP3") with open("Hello_world.ogg", "wb") as f: f.write(hello_world_ogg) with open("Hello_world.mp3", "wb") as f: f.write(hello_world_mp3) asyncio.run(main()) ``` ### easygTTS ```python import asyncio import aiohttp import asyncgTTS async def main(): async with aiohttp.ClientSession() as session: gtts = await asyncgTTS.setup(premium=False, session=session) hello_world = await gtts.get(text="Hello World") with open("Hello_world.mp3", "wb") as f: f.write(hello_world) asyncio.run(main()) ```


نیازمندی

مقدار نام
- aiohttp
- pyJWT[crypto]


نحوه نصب


نصب پکیج whl asyncgTTS-0.3.1:

    pip install asyncgTTS-0.3.1.whl


نصب پکیج tar.gz asyncgTTS-0.3.1:

    pip install asyncgTTS-0.3.1.tar.gz