Dialogue v3

This guide shows how to generate spoken dialogue using the Dialogue v3 model via the Leonardo.AI REST API.

Sample Request

curl --request POST \
     --url https://cloud.leonardo.ai/api/rest/v2/generations \
     --header 'accept: application/json' \
     --header 'authorization: Bearer <YOUR_API_KEY>' \
     --header 'content-type: application/json' \
     --data '
{
    "model": "dialogue-v3",
    "public": false,
    "parameters": {
      "prompt": "Welcome back, traveller. The city gates close at sundown, so lets not waste any time.",
      "voice_id": "JBFqnCBsd6RMkjVDRZzb",
      "language_code": "en",
      "prompt_influence": 0.5,
      "quantity": 1
    }
}
'

Recipe

API Request Endpoint, Headers, Parameters

Endpoint

https://cloud.leonardo.ai/api/rest/v2/generations

Headers

--header "accept: application/json" \
--header "authorization: Bearer <YOUR_API_KEY>" \
--header "content-type: application/json"

Body Parameters

ParameterTypeDefinition
language_codestringLanguage of the generated speech as an ISO 639-1 code (e.g. en). Defaults to en.
modelstringSpecifies the model used for generation. Set to dialogue-v3.
promptstringThe dialogue text to generate as speech. Maximum of 5000 characters.
prompt_influencenumberControls how closely the output follows the prompt. Ranges from 0 to 1. Defaults to 0.5.
publicbooleanControls whether the generated audio is public (true) or private (false).
quantitynumberThe number of outputs to generate. Set to 1, 2, 3, or 4. Defaults to 1.
voice_idstringID of the preset voice used for speech. Defaults to JBFqnCBsd6RMkjVDRZzb (George). See List of Voice IDs below.

List of Voice IDs

The API accepts the following voice_id values:

VoiceVoice ID
AdampNInz6obpgDQGcFmaJgB
AliceXb7hH8MSUJpSbSDYk0k2
Bellahpp4J3VqNfWAUOO0d1Us
BillpqHfZKP75CvOlQylNhV4
BriannPczCjzI2devNBz1zQrb
CallumN2lVS1w4EtoT3dr4eOWO
CharlieIKne3meq5aSn9XLyUdCD
ChrisiP95p4xoKVk53GoZ742B
DanielonwK4e9ZLuTAKqWW03F9
EriccjVigY5qzO86Huf0OWal
GeorgeJBFqnCBsd6RMkjVDRZzb
HarrySOYHLrjzK2X1ezoPC6cr
JessicacgSgspJ2msm6clMCkdW9
LauraFGY2WhTYpPnrIDTdsKH5
LiamTX3LPaxmHKxFdv7VOQHJ
LilypFZP5JQG7iQjIQuC4Bku
MatildaXrExE9yKIg1WjnnlVkGX
RiverSAz9YHcvj6GT2YYXdXww
RogerCwhRBWXzGAHq8TQ4Fs17
SarahEXAVITQu4vr4xnSDxMaL
WillbIHbv24MWmeRgasZH58o


Did this page help you?