Voice Design quickstart
This guide will show you how to design a voice via a prompt using the Voice Design API.
Using the Voice Design API
Create an API key
Create an API key in the dashboard here, which you’ll use to securely access the API.
Store the key as a managed secret and pass it to the SDKs either as a environment variable via an .env
file, or directly in your app’s configuration depending on your preference.
Install the SDK
We’ll also use the dotenv
library to load our API key from an environment variable.
Make the API request
Designing a voice via a prompt has two steps:
- Generate previews based on a prompt.
- Select the best preview and use it to create a new voice.
We’ll start by generating previews based on a prompt.
Create a new file named example.py
or example.mts
, depending on your language of choice and add the following code:
Next steps
Explore the API reference for more information on the Voice Design API and its options.