Skip to main content

Asynchronous ZvukoGram API wrapper

Project description

ZvukoGram API

PyPI PyPI

A simple, yet powerful library for ZvukoGram API

Usage

With ZvukoGram API you can fully access the ZvukoGram API.

Documentation

Official docs can be found on the API's webpage

Installation

pip install zvukogram

Requirements

  • Python 3.7+
  • aiohttp
  • pydantic

Features

  • Asynchronous
  • Exception handling
  • Pydantic return model
  • LightWeight

Basic example

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

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

zvukogram-1.0.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

zvukogram-1.0.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file zvukogram-1.0.0.tar.gz.

File metadata

  • Download URL: zvukogram-1.0.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for zvukogram-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c75d0ce2a7b2dfa29218e643d33e7aea06fdcca35485080fbe11de9f2d7c9de7
MD5 972683e4b0414c14ab1a403f1d69908b
BLAKE2b-256 935abae526485331880cd89dc5c8caba6c608551c0c0ba1cfbe8a52f89f0cb34

See more details on using hashes here.

File details

Details for the file zvukogram-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: zvukogram-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for zvukogram-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa25419ea49df145556fdf53918ff59681c4af85633657056246ad96ce74f684
MD5 87d1a08df367e319e1066513c1109899
BLAKE2b-256 20ced3da8309937010ceb428baacbc7f7c38727d664062d41d1fcbb76f7560e0

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