Skip to main content

Resemble API Client Library

Project description

resemble.ai API

resemble.ai is a state-of-the-art natural voice cloning and synthesis provider. Best of all, the platform is accessible by using our public API! Sign up here to get an API token!

This repository hosts a Python library for convenient usage of the Resemble API.

Quick start

from resemble import Resemble

Resemble.api_key('your_api_key')

project = Resemble.v2.projects.get('project_uuid')
voice = Resemble.v2.voices.get('voice_uuid')

clip = Resemble.v2.clips.create_sync('project_uuid', 'voice_uuid', 'This is a test')

Streaming

The Streaming API is currently in beta and is not available to all users. Please reach out to team@resemble.ai to inquire more.

Streaming example:

from resemble import Resemble

Resemble.api_key('your_api_key')
Resemble.syn_server_url('your_resemble_synthesis_server_url') # Extra configuration required for streaming

for chunk in Resemble.v2.clips.stream('project_uuid', 'vouce_uuid', 'This is a test'):
    # do something with the `chunk` of audio data, such as feeding it into a streaming audio player
    pass

Development

The library files are located in resemble/

Testing

Note that currently the test suite performs real actions against the Resemble AI platform (e.g., creating projects, retrieving clips, updating voices, et cetera).

# For tests that do NOT require a voice
$ TEST_API_KEY=<...> TEST_BASE_URL=<...> python3 -m unittest

# For tests that do require a voice
$ TEST_API_KEY=<...> TEST_BASE_URL=<...> TEST_VOICE_UUID=<...> python3 -m unittest

Publishing new versions

You need the build and twine pip packages. (pip3 install build twine)

  1. git status: Make sure your working directory has no pending changes.
  2. Update the version attribute in setup.py.
  3. git commit: Commit this version change.
  4. Build the package: make pkg.build
  5. (optional) Publish to the test index:
make pkg.publish.test
  1. Publish to the index
make pkg.publish

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

resemble-1.4.3.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

resemble-1.4.3-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file resemble-1.4.3.tar.gz.

File metadata

  • Download URL: resemble-1.4.3.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for resemble-1.4.3.tar.gz
Algorithm Hash digest
SHA256 d997a68499a390bfb690fff4fe1bf4a8ab1abfb21104555077e3b19612571819
MD5 340102c10e66eab104de3ebed2db55e6
BLAKE2b-256 2aedf3319332afa7520c6d9ecdbc8e7d4c6f83aa7af61295fc041830c98f24ad

See more details on using hashes here.

File details

Details for the file resemble-1.4.3-py3-none-any.whl.

File metadata

  • Download URL: resemble-1.4.3-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for resemble-1.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4b5b0d719cbba98909379d42aced283b1061f3287e2f368b82c98da8a4dc5a8d
MD5 3219c90267c4e252af8c5eb63165b911
BLAKE2b-256 f7622961e229601596709bc2cc391c8001c6cd7e9e332ae90c43b7c537b3236e

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