Getting Started
The Deeptune Python library provides convenient access to the Deeptune API from Python.
Installation
Usage
Instantiate and use the client with the following:
Cloning Voices
There are two different ways you can manage voices with the Deeptune API.
- Use Deeptune’s inbuilt voices to upload and manage voices.
- Manage voices yourself (eg in your own DB) and clone with
generate_from_prompt
.
Clone with Voices
Use Deeptune’s inbuilt voices to upload and manage voices.
Clone with Audio Prompt
Manage voices yourself (for example, in your own DB and S3).
Saving the output
Saving manually
The generate
and generate_from_prompt
endpoints return an iterator of bytes. Make sure to get all of the bytes before writing as demonstrated below.
Using built in utils
The also has inbuilt play
, save
, and stream
utility methods. Under the hood, these methods use ffmpeg and mpv to play audio streams.
Async Client
The SDK also exports an async
client so that you can make non-blocking calls to our API.