Voice

Create voice

Submits a request to create a voice given configuration data and some source audio.

POST
/v1/ai/voice

Authorizations

X-API-Key
string
header
required

Your API key; get it from your LMNT settings.

Body

multipart/form-data
name
string
required

The display name for this voice

enhance
boolean
required

For unclean audio with background noise, applies processing to attempt to improve quality. Default is false as this can also degrade quality in some circumstances.

gender
string

A tag describing the gender of this voice. Has no effect on voice creation.

description
string

A text description of this voice.

files
string[]
required

One or more input audio files to train the voice in the form of binary wav, mp3, mp4, m4a, or webm attachments.

  • Max attached files: 20.
  • Max total file size: 250 MB.

Response

application/json
description
string

A text description of this voice.

gender
string

A tag describing the gender of this voice, e.g. male, female, nonbinary.

id
string
required

The unique identifier of this voice.

name
string
required

The display name of this voice.

owner
enum<string>
required

The owner of this voice.

Allowed options: system, me, other

starred
boolean

Whether this voice has been starred by you or not.

state
string
required

The state of this voice in the training pipeline (e.g., ready, training).

type
enum<string>

The method by which this voice was created: instant or professional.

Allowed options: instant, professional

preview_url
string

A URL that returns a preview speech sample of this voice. The file can be played directly in a browser or audio player.

Code samples

curl --request POST \
  --url https://api.lmnt.com/v1/ai/voice \
  --header 'X-API-Key: <your-api-key>' \
  --form 'name=new-voice' \
  --form 'enhance=false' \
  --form 'files=@/Users/user/file.wav'