Skip to main content
Voice Design creates natural, realistic voices from a text description. Describe the character you want for your voice agent or product, and Gradium generates a few candidates. You listen, then convert the one you like into a permanent voice. From then on it works like any other voice_id: REST, WebSocket and Speech-to-Speech. No reference audio is needed.

Have a recording instead?

Custom voices clone a speaker from a short audio sample.

How it works

1. Generate

Send a description, get candidate voices back in seconds.

2. Listen

Audition each candidate on a short line of Text-to-Speech.

3. Convert

Promote your pick to a permanent voice_id.

4. Use it

Text-to-Speech, streaming, and Speech-to-Speech all accept it.
Describe the voice in five short parts, up to 500 characters, in English, French, Spanish, Portuguese or German. Gradium puts the description into the shape the model was trained on and samples 1 to 5 complete voices from it, ready in a few seconds (see Writing a description). Audition each on a short line, then convert the one you want. Until you convert it, a candidate cannot be used in production. Two things to know. The model samples a new voice on every request, so if you like a candidate, convert it: re-running the request will not bring it back. And the candidates from one request are variations on one character. For a different character, change the description.

Access

Base URL https://api.gradium.ai/api, API key in the x-api-key header.

Quickstart

The steps run as one sequence, carrying ids in shell variables or Python names.
1

Generate candidates

201 Created
Generation runs in the background, so the ids come back with ready: false.
Every request mints new ids. Store them. To recover ids you did not store, list your candidates with GET /voice-generator/embeddings.
2

Wait for them to be ready

200 OK
Three candidates typically take three to five seconds. Bound the loop at about two minutes and offer a retry.An unknown id returns 200 with an empty embeddings list, not 404, so check the list before indexing into it. Timestamps are UTC with or without a trailing Z.
3

Listen to a candidate

Pass the candidate id as voice_id on the normal Text-to-Speech endpoint. The vox_emb_ prefix is how the API tells a candidate from a converted voice.
The response body is the audio, 48 kHz mono. Repeat for the other candidates.Candidates have three restrictions that converted voices do not:
  • Text is capped at 100 characters (400 input text too long).
  • REST only. The TTS WebSocket and Speech-to-Speech reject candidate ids with error 1011.
  • A candidate that is not ready, unknown, or from another account returns 404 Embedding not found.
Audition with the model_name and json_config you will ship, so the voice you approve is the voice you get.
4

Convert the candidate into a voice

A candidate is a draft, deleted 30 days after generation. Converting it creates a permanent voice in your library.
201 Created
uid is your permanent voice_id. Store this one. It is the same value as voxium_embedding_id in the request and voice_id everywhere else.
  • Converting is free. The voice uses one custom-voice slot, shared with voice clones. Over the allowance: 409 Custom voice limit reached.
  • It clears the candidate’s expiry.
  • Converting the same candidate twice: 409 A voice was already created from this embedding: <voice_id>. Store the candidate-to-voice mapping yourself rather than parsing this.
  • Not ready or unknown: 409 Embedding is not ready yet.
5

Use the voice

No length cap here. The same voice_id works with the Python SDK, the TTS WebSocket and Speech-to-Speech.
6

Clean up

Candidates you do not convert are removed after 30 days. To remove one sooner:
cURL
Safe at any time: a converted voice holds its own copy. An id that is already gone returns 404.

Complete example

The whole flow in one file. Set GRADIUM_API_KEY and run it. It creates a real voice in your account.
Audio is streamed, so WAV headers carry placeholder lengths. Readers that trust the header, such as Python’s wave, report a wrong duration. Rewrite the RIFF and data sizes after saving if that matters to you.

Writing a description

The description is the only input the model has. It was trained on descriptions with five parts in a fixed order, and Voice Design tidies what you send into that shape before it generates. The tidying fixes the order, but it cannot add a part you left out, and it keeps vague words as they are. A part you leave out is decided at random, and it can change from one candidate to the next. One short sentence per part, in that order:
Feminine, middle-aged. Tour guide. Scottish accent. Enthusiastic, amused. A bright, clear voice with a lively pace.
In Studio, the Prompting tips button next to the description opens the same guidance beside the field.
The Voice design page with a five-part description in the field and the Prompting tips panel open, with the Prompting tips button outlinedThe Voice design page with a five-part description in the field and the Prompting tips panel open, with the Prompting tips button outlined

Rules of thumb

  • Keep it short. One short sentence per part, in common words. Most good descriptions are under 200 characters; the 500 character limit is a ceiling, not a target.
  • Give age as a group, not a number. “Middle-aged” works; “47” or “40 to 55” does not help.
  • Name one accent, in its own sentence. A regional accent works as well as a broad one: “Scottish”, “Bristolian” or “Texan”. Set language to the language the voice will speak; the accent still goes in the description.
  • Pitch is reliable, texture is a nudge. “Low” and “high” mean the same thing to everyone, model included. “Breathy” or “raspy” move the voice less reliably; pair them with a pitch word.
  • Describe the voice, not the script or the scene. Words to be spoken go in the audition line. Plot, setting, exact numbers and film references do not help.
  • For a character, push further. “Very high”, “very low”, two or three texture words stacked, a stronger mood word.

Examples

A role on its own leaves the rest to chance. Three candidates for “A tour guide.” ranged from about 110 Hz to 260 Hz: the model did not even settle on a gender. Filling in the other parts fixes that.

Let the script do the acting

Pace, pauses and punch come mostly from the text the voice reads, not from the description. With the same voice, “Everybody out, now!” and “Everybody out. Now!” sound different: the full stop gives the shout its own beat. Splitting a long sentence in two adds a pause and slows the start.

Iterating

Change the part that is off rather than rewriting the description.

Building this into a product

If you expose voice design to your own users, prefill a form over the five parts and compose the sentence from it in order, with a free-text box as the escape hatch. Show the 500 character limit. Offer “keep this one” as the way to hold onto a voice, and make regenerate send a new description rather than more samples.

Generation settings

Generation settings shape the voice and go in json_config on POST /voice-generator/generate. Synthesis settings shape each utterance and go in json_config on the TTS request. Voice Design still supports cfg_scale to control how literally the voice follows your description. All generation settings are optional. The defaults are tuned, so send only the keys you have a reason to change.

cfg_scale

  • 5.0, the default, when exploring with 3 to 5 candidates and you want them to differ.
  • 8.0 to 12.0 when candidates drift from the description, or when generating one candidate at a time. Conversational designers that generate one candidate per turn typically use 10.0.
  • Above 12.0 the voice follows the description ever more literally at the cost of naturalness, and candidates converge on each other.
cfg_scale cannot add a part the description does not name. Fix the description first.

The json_config allow-list

Send only cfg_scale. An unknown key or out-of-range value is not rejected. The request returns 201 and the candidates never become ready. Bound your polling loop and treat a timeout as a bad request.The usual causes: a synthesis setting such as temp, or cfg_scale outside its range.

Synthesis settings

Auditioning a candidate or synthesising with a converted voice is an ordinary TTS request, so everything in Voice Settings applies. See Model selection for TTS model access.

Temperature (temp)

0.0 to 1.4, default 0.7.
  • Audition at the default. 0.0 makes a lively voice sound flatter than it will in production.
  • 0.3 to 0.5 for scripted, high-volume output where takes must match: IVR prompts, fixed announcements.
  • Default or slightly above for conversational agents and narration.

Supported tags

The models read plain text. Two inline tags are recognised, on candidates and converted voices alike. Anything else is spoken aloud as text. On a candidate, tags count toward the 100-character limit.

Not supported

SSML is not interpreted. <speak><prosody rate="slow">Hello there.</prosody></speak> produces a voice saying “speak prosody rate slow, hello there, slash prosody, slash speak”. Use these instead: Markdown and HTML are read as text too. Strip formatting before sending.

Candidate lifecycle

Limits

Errors

Errors are {"detail": "..."}, except 422, which carries a list of field errors. A candidate that never becomes ready is almost always a json_config value out of range or a key the API does not recognise. See the allow-list.

Next steps

Voice Localization

Make a candidate or converted voice speak another language or accent.

Manage Voices

List, update, and delete the voices you convert.

Voice Settings

Speed, temperature and other synthesis options.

Streaming Text-to-Speech

Use your new voice on the low-latency WebSocket.

API Reference

The Voice Design endpoints in full.