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
Install nose (pip install nose
), then run tests like so:
$ TEST_API_KEY=<...> TEST_BASE_URL=<...> nosetests
Note: To see print()
output, add --nocapture
like so: nosetests --nocapture
Publishing new versions
You need the build
and twine
pip packages. (pip3 install build twine
)
git status
: Make sure your working directory has no pending changes.- Update the version attribute in
setup.cfg
. git commit
: Commit this version change.- Remove previous builds:
rm -rf ./dist/
. - Build the package:
python3 -m build
. - (optional) Publish to the test index:
python3 -m twine upload --repository testpypi dist/*
- Publish to the index
python3 -m twine upload dist/*
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.