A simple, yet powerful library for ZvukoGram API
With ZvukoGram API
you can fully access the ZvukoGram API.
Official docs can be found on the API's webpage
pip install zvukogram
Python 3.7+
aiohttp
pydantic
Asynchronous
Exception handling
Pydantic return model
LightWeight
import asyncio
from zvukogram import ZvukoGram, ZvukoGramError
api = ZvukoGram('token', 'email')
async def main():
try:
voices = await api.get_voices()
print(voices['Русский'].pop().voice)
except ZvukoGramError as exc:
print(exc)
generation = await api.tts(
voice='Бот Максим',
text='Привет!',
)
print(generation.file)
audio = await generation.download()
generation = await api.tts_long(
voice='Бот Максим',
text='Более длинный текст!',
)
while not generation.file:
await asyncio.sleep(1)
generation = await api.check_progress(generation.id)
print(generation.file)
asyncio.run(main())
Developed by Nikita Minaev (c) 2023