Gradium

App · 20 actions

Generate and transcribe speech, design voices, and manage pronunciation dictionaries.

Actions

ActionWhat it does
Clone a voice from an audio sampleClone a voice from an audio sample.
Convert text to speechConvert text to speech.
Create a pronunciation dictionaryCreate a pronunciation dictionary.
Create a voice from a candidateCreate a voice from a candidate.
Delete a custom voiceDelete a custom voice.
Delete a pronunciation dictionaryDelete a pronunciation dictionary.
Delete a voice candidateDelete a voice candidate.
Enhance a voiceEnhance a voice.
Generate voice candidatesGenerate voice candidates.
Get a pronunciation dictionaryGet a pronunciation dictionary.
Get a voiceGet a voice.
Get credit balanceGet credit balance.
List available accentsList available accents.
List pronunciation dictionariesList pronunciation dictionaries.
List voice candidatesList voice candidates.
List voicesList voices.
Localize a voiceLocalize a voice.
Transcribe an audio fileTranscribe an audio file.
Update a custom voiceUpdate a custom voice.
Update a pronunciation dictionaryUpdate a pronunciation dictionary.

Clone a voice from an audio sample

Clone a voice from an audio sample.

Inputs

Audio fileaudio_filetextRequired
Audio file.
NamenametextRequired
Name.
Input formatinput_formattext
Audio format. If omitted, inferred from the audio_file extension.
Descriptiondescriptiontext
Description.
LanguagelanguagetextRequired
Language spoken in the audio sample.One of: en, fr, es, pt, de.
Start sstart_snumber
Start s.
Enhanceenhancetrue/false
Enhance the new voice clone. Set to false to opt out of enhancement.
Timeout stimeout_snumber
Timeout s.

Outputs

dataobject
The response from Gradium.
Example output
{
  "data": {
    "error": "example",
    "uid": "example",
    "was_updated": true
  }
}

Convert text to speech

Convert text to speech.

Inputs

TexttexttextRequired
Text.
Voicevoice_idtextRequired
Voice id.
Output formatoutput_formattextRequired
Output format.One of: wav, opus, pcm, ulaw_8000 (Ulaw 8000), mulaw_8000 (Mulaw 8000), alaw_8000 (Alaw 8000), pcm_8000 (Pcm 8000), pcm_16000 (Pcm 16000), pcm_22050 (Pcm 22050), pcm_24000 (Pcm 24000), pcm_44100 (Pcm 44100), pcm_48000 (Pcm 48000).

Outputs

dataobject
The response from Gradium.
Example output
{
  "data": {
    "content_base64": "example",
    "content_type": "example"
  }
}

Create a pronunciation dictionary

Create a pronunciation dictionary.

Inputs

NamenametextRequired
Name.
Descriptiondescriptiontext
Description.
LanguagelanguagetextRequired
Language.One of: en, fr, es, pt, de.
Rulesruleslist
Rules.

Outputs

dataobject
The response from Gradium.
Example output
{
  "data": {
    "created_at": "example",
    "description": "example",
    "language": "example",
    "name": "example",
    "org_uid": "example",
    "rules": [
      {
        "case_sensitive": true,
        "id": 1,
        "original": "example",
        "rewrite": "example"
      }
    ],
    "uid": "example"
  }
}

Create a voice from a candidate

Create a voice from a candidate.

Inputs

Voxium embedding IDvoxium_embedding_idtextRequired
Id of the candidate to keep, as returned by `POST /voice-generator/generate`.
NamenametextRequired
A name for the voice.
Descriptiondescriptiontext
An optional description of the voice.

Outputs

dataobject
The response from Gradium.
Example output
{
  "data": {
    "description": "example",
    "language": "example",
    "name": "example",
    "uid": "example"
  }
}

Delete a custom voice

Delete a custom voice.

Inputs

Voice uidvoice_uidtextRequired
Voice uid.

Outputs

dataobject
The response from Gradium.
Example output
{
  "data": {}
}

Delete a pronunciation dictionary

Delete a pronunciation dictionary.

Inputs

Dictionarydictionary_idtextRequired
Dictionary id.

Outputs

dataobject
The response from Gradium.
Example output
{
  "data": {}
}

Delete a voice candidate

Delete a voice candidate.

Inputs

Embedding IDembedding_idtextRequired
Embedding id.

Outputs

dataobject
The response from Gradium.
Example output
{
  "data": {}
}

Enhance a voice

Enhance a voice.

Inputs

Src voicesrc_voicetextRequired
The voice to enhance: a voice id (your clone, a converted candidate or a flagship voice) or a `vox_emb_` candidate id. It keeps its language and is not modified.
N samplesn_samplesnumber
Number of candidates to produce. All candidates in one request are variations of the same speaker.From 1 to 5.

Outputs

dataobject
The response from Gradium.
Example output
{
  "data": {
    "embeddings": [
      {
        "embedding_id": "example",
        "expires_at": "example",
        "ready": true
      }
    ]
  }
}

Generate voice candidates

Generate voice candidates.

Inputs

PromptprompttextRequired
The voice description, up to 500 characters. Must contain actual text, not only spaces.
LanguagelanguagetextRequired
Language the voice will speak. Shapes the accent and the delivery.One of: en, fr, es, pt, de.
N samplesn_samplesnumber
Number of candidate voices to sample from the description. All candidates in one request are variations on the same character.From 1 to 5.
JSON configjson_configobject
Advanced sampling options.

Outputs

dataobject
The response from Gradium.
Example output
{
  "data": {
    "embeddings": [
      {
        "embedding_id": "example",
        "expires_at": "example",
        "ready": true
      }
    ]
  }
}

Get a pronunciation dictionary

Get a pronunciation dictionary.

Inputs

Dictionarydictionary_idtextRequired
Dictionary id.

Outputs

dataobject
The response from Gradium.
Example output
{
  "data": {
    "created_at": "example",
    "description": "example",
    "language": "example",
    "name": "example",
    "org_uid": "example",
    "rules": [
      {
        "case_sensitive": true,
        "id": 1,
        "original": "example",
        "rewrite": "example"
      }
    ],
    "uid": "example"
  }
}

Get a voice

Get a voice.

Inputs

Voice uidvoice_uidtextRequired
Voice uid.

Outputs

dataobject
The response from Gradium.
Example output
{
  "data": {
    "description": "example",
    "filename": "example",
    "is_catalog": true,
    "is_pro_clone": true,
    "language": "example",
    "name": "example",
    "rank": 1,
    "start_s": 1,
    "tags": [
      {
        "category": "example",
        "value": "example"
      }
    ],
    "uid": "example"
  }
}

Get credit balance

Get credit balance.

Inputs

None.

Outputs

dataobject
The response from Gradium.
Example output
{
  "data": {
    "allocated_credits": 1,
    "billing_period": "example",
    "next_rollover_date": "example",
    "plan_name": "example",
    "remaining_credits": 1
  }
}

List available accents

List available accents.

Inputs

None.

Outputs

dataobject
The response from Gradium.
Example output
{
  "data": {
    "languages": {}
  }
}

List pronunciation dictionaries

List pronunciation dictionaries.

Inputs

Limitlimitnumber
Limit.From 0 to 1000.
Offsetoffsetnumber
Offset.At least 0.
Languagelanguagetext
Language.

Outputs

dataobject
The response from Gradium.
Example output
{
  "data": {
    "dictionaries": [
      {
        "created_at": "example",
        "description": "example",
        "language": "example",
        "name": "example",
        "org_uid": "example",
        "rules": [
          {}
        ],
        "uid": "example"
      }
    ],
    "total": 1
  }
}

List voice candidates

List voice candidates.

Inputs

Embedding IDembedding_idtext
Look up a single candidate by id. Omit to list all candidates.
Skipskipnumber
Skip.At least 0.
Limitlimitnumber
Limit.From 1 to 1000.

Outputs

dataobject
The response from Gradium.
Example output
{
  "data": {
    "embeddings": [
      {
        "created_at": "example",
        "edit_language_config": {
          "accent": "example",
          "gender": "male",
          "src_language": "example",
          "src_voice": "example",
          "target_language": "example"
        },
        "embedding_id": "example",
        "enhance_config": {
          "src_language": "example",
          "src_voice": "example"
        },
        "expires_at": "example",
        "generate_config": {
          "language": "example",
          "prompt": "example"
        },
        "kind": "generate",
        "language": "example",
        "prompt": "example",
        "ready": true
      }
    ]
  }
}

List voices

List voices.

Inputs

Skipskipnumber
Skip.At least 0.
Limitlimitnumber
Limit.At least 0.
Include cataloginclude_catalogtrue/false
Also return Gradium catalog voices. Your organization's own voices come first, then catalog voices by `rank`, lowest first, unranked last.
Localelocaletext
Only voices of this locale, e.g. `en-nz` or `fr-fr`.
Gendergendertext
Only voices of this gender: `male`, `female` or `neutral`.
Use caseuse_casetext
Only voices tagged with this use case, e.g. `Customer Service`, `Conversational`, `Narration` or `Ads & Social Media`. URL-encode it (`Ads%20%26%20Social%20Media`).

Outputs

datalist
The response from Gradium.
Example output
{
  "data": [
    {
      "description": "example",
      "filename": "example",
      "is_catalog": true,
      "is_pro_clone": true,
      "language": "example",
      "name": "example",
      "rank": 1,
      "start_s": 1,
      "tags": [
        {
          "category": "example",
          "value": "example"
        }
      ],
      "uid": "example"
    }
  ]
}

Localize a voice

Localize a voice.

Inputs

Src voicesrc_voicetextRequired
The voice to localize: a voice id (your clone, a converted candidate or a flagship voice) or a `vox_emb_` candidate id. The source is not modified.
Target languagetarget_languagetextRequired
Language the candidates will speak. May equal the source language: that is an accent change.One of: en, fr, es, pt, de.
Accentaccenttext
One of the accents `GET /voice-generator/available-accents` lists for `target_language`, matched case-insensitively. Omitted: the first accent listed for that language.
Gendergendertext
Opens the edit caption. Omitted: the source voice's gender tag, or the gender of the source candidate's own localization, or no gender. Clones and converted voices carry no tag, so send it for them.One of: male, female.
N samplesn_samplesnumber
Number of candidates to produce. All candidates in one request are variations of the same localized speaker.From 1 to 5.

Outputs

dataobject
The response from Gradium.
Example output
{
  "data": {
    "embeddings": [
      {
        "embedding_id": "example",
        "expires_at": "example",
        "ready": true
      }
    ]
  }
}

Transcribe an audio file

Transcribe an audio file.

Inputs

AudioaudiotextRequired
Audio.
Languagelanguagetext
Language.One of: en, fr, es, pt, de.

Outputs

dataobject
The response from Gradium.
Example output
{
  "data": {
    "events": [
      {}
    ],
    "transcript": "example"
  }
}

Update a custom voice

Update a custom voice.

Inputs

Voice uidvoice_uidtextRequired
Voice uid.
Namenametext
Name.
Descriptiondescriptiontext
Description.
Languagelanguagetext
Language.
Start sstart_snumber
Start s.
Tagstagslist
Tags.
Rankranknumber
Rank.

Outputs

dataobject
The response from Gradium.
Example output
{
  "data": {
    "description": "example",
    "filename": "example",
    "has_audio": true,
    "is_pending": true,
    "is_pro_clone": true,
    "language": "example",
    "name": "example",
    "org_uid": "example",
    "start_s": 1,
    "stop_s": 1,
    "uid": "example"
  }
}

Update a pronunciation dictionary

Update a pronunciation dictionary.

Inputs

Dictionarydictionary_idtextRequired
Dictionary id.
Namenametext
Name.
Descriptiondescriptiontext
Description.
Languagelanguagetext
Language.One of: en, fr, es, pt, de.
Rulesruleslist
Rules.

Outputs

dataobject
The response from Gradium.
Example output
{
  "data": {
    "created_at": "example",
    "description": "example",
    "language": "example",
    "name": "example",
    "org_uid": "example",
    "rules": [
      {
        "case_sensitive": true,
        "id": 1,
        "original": "example",
        "rewrite": "example"
      }
    ],
    "uid": "example"
  }
}

On this page