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
Deepfake Detection
Detect AI-generated or manipulated content in audio, video, and image files.
from resemble import Resemble
Resemble.api_key('your_api_key')
# Asynchronous detection (default)
detection = Resemble.v2.deepfake_detection.detect(
url='https://example.com/suspicious_audio.wav',
callback_url='https://your-site.com/webhook', # Optional: receive results via webhook
visualize=True # Optional: generate detection visualizations
)
print(f"Detection started with UUID: {detection['item']['uuid']}")
# Check detection results
results = Resemble.v2.deepfake_detection.get(detection['item']['uuid'])
print(f"Detection status: {results['item']['metrics']}")
# Synchronous detection (wait for results)
sync_results = Resemble.v2.deepfake_detection.detect(
url='https://example.com/video.mp4',
synchronous=True,
frame_length=2, # Analysis frame length in seconds
pipeline='general->facial', # Detection pipeline for images/video
max_video_fps=30 # Limit video processing FPS
)
Supported formats:
- Audio: wav, mp3, ogg, m4a, flac
- Video: mp4, mov, avi, wmv
- Image: jpg, jpeg, png, gif, webp
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)
git status: Make sure your working directory has no pending changes.- Update the version attribute in
setup.py. git commit: Commit this version change.- Build the package:
make pkg.build - (optional) Publish to the test index:
make pkg.publish.test
- Publish to the index
make pkg.publish
Metadata
Release files for resemble 1.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| resemble-1.9.0.tar.gz | 12.6 kB | Without provenance | Details for resemble-1.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| resemble-1.9.0-py3-none-any.whl | Python 3 | none | any | Details for resemble-1.9.0-py3-none-any.whl |
Total release size: 22.7 kB
Release files / resemble-1.9.0.tar.gz
| Download URL | resemble-1.9.0.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a8f10f047697b2c3f9a840c3f25c3bdf51cb7002d4a43f857d0a5107290010d
|
|
BLAKE2b-256 checksum How to use checksums |
42d571f0e0d0e9b9ee7c530926a9b64a75bd678eb9e079f51e18457411e561d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.0
|
Release files / resemble-1.9.0-py3-none-any.whl
| Download URL | resemble-1.9.0-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28060129b3255ae62b40d23eee9677b67c64fb45dd99621548e83118799ef96e
|
|
BLAKE2b-256 checksum How to use checksums |
eeb496eda9b1629a7fd2b430e8877c255e44b10df44e91cc5a0b521d2f514670
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.0
|
Security for resemble 1.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.