Skip to content
DashboardGet API Key

List voices for speaker assignment

client.VideoTranslate.Voices.List(ctx, query) (*VideoTranslateVoiceListResponse, error)
GET/v1/video-translate/voices

Lists the voices that can be used as values in config.speaker_voices. voice_id is the external voice ID to submit. name and is_favorite reflect the authenticated account’s personalization; default_name is the catalog name. Ordered by favorites first, then name (case-insensitive), then voice_id.

ParametersExpand Collapse
query VideoTranslateVoiceListParams
Application param.Field[string]Optional

Case-insensitive exact match on the voice’s application (use case), for example narration (max 100 characters).

maxLength100
Favorite param.Field[bool]Optional

Only favorites (true) or only non-favorites (false).

Gender param.Field[VideoTranslateVoiceListParamsGender]Optional

Case-insensitive gender filter.

const VideoTranslateVoiceListParamsGenderMale VideoTranslateVoiceListParamsGender = "Male"
const VideoTranslateVoiceListParamsGenderFemale VideoTranslateVoiceListParamsGender = "Female"
const VideoTranslateVoiceListParamsGenderOther VideoTranslateVoiceListParamsGender = "Other"
Language param.Field[string]Optional

Case-insensitive exact match on the voice’s primary language or any of its verified languages (max 100 characters).

maxLength100
Limit param.Field[int64]Optional

Page size. Non-integers and values below 1 are rejected with 400; values above 100 are clamped to 100.

minimum1
maximum100
Offset param.Field[int64]Optional

Number of items to skip. Non-integers and negative values are rejected with 400.

minimum0
ReturnsExpand Collapse
type VideoTranslateVoiceListResponse struct{…}
Voices []VideoTranslateVoiceListResponseVoice
Application string

Intended use case, for example narration.

DefaultName string
Description string
Gender VideoTranslateVoiceListResponseVoicesGender
One of the following:
const VideoTranslateVoiceListResponseVoicesGenderMale VideoTranslateVoiceListResponseVoicesGender = "Male"
const VideoTranslateVoiceListResponseVoicesGenderFemale VideoTranslateVoiceListResponseVoicesGender = "Female"
const VideoTranslateVoiceListResponseVoicesGenderOther VideoTranslateVoiceListResponseVoicesGender = "Other"
IsFavorite bool

Whether the authenticated account marked this voice as a favorite.

Language string

Primary language label.

Name string

Effective name (the account’s custom name when set, otherwise default_name).

VoiceID string

External voice ID. Use this value in config.speaker_voices.

List voices for speaker assignment

package main

import (
  "context"
  "fmt"

  "github.com/chamelaion/chamelaion-go/v2"
  "github.com/chamelaion/chamelaion-go/v2/option"
)

func main() {
  client := githubcomchamelaionchamelaiongo.NewClient(
    option.WithBearerToken("My Bearer Token"),
  )
  voices, err := client.VideoTranslate.Voices.List(context.TODO(), githubcomchamelaionchamelaiongo.VideoTranslateVoiceListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", voices.Pagination)
}
{
  "voices": [
    {
      "voice_id": "21m00Tcm4TlvDq8ikWAM",
      "name": "Rachel (narration)",
      "default_name": "Rachel",
      "description": "Calm, young adult female voice.",
      "language": "en",
      "application": "narration",
      "gender": "Female",
      "is_favorite": true
    }
  ],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "total": 1
  }
}
{
  "error": "gender must be one of Male, Female, Other"
}
{
  "error": "favorite must be true or false"
}
{
  "error": "missing authorization header"
}
{
  "error": "invalid authorization format"
}
{
  "error": "missing token"
}
{
  "error": "invalid token"
}
{
  "error": "unauthorized"
}
{
  "error": "rate limit exceeded"
}
{
  "error": "internal error"
}
Returns Examples
{
  "voices": [
    {
      "voice_id": "21m00Tcm4TlvDq8ikWAM",
      "name": "Rachel (narration)",
      "default_name": "Rachel",
      "description": "Calm, young adult female voice.",
      "language": "en",
      "application": "narration",
      "gender": "Female",
      "is_favorite": true
    }
  ],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "total": 1
  }
}
{
  "error": "gender must be one of Male, Female, Other"
}
{
  "error": "favorite must be true or false"
}
{
  "error": "missing authorization header"
}
{
  "error": "invalid authorization format"
}
{
  "error": "missing token"
}
{
  "error": "invalid token"
}
{
  "error": "unauthorized"
}
{
  "error": "rate limit exceeded"
}
{
  "error": "internal error"
}