# Voices & languages

The voice roster, preview clips, and the languages endpoint.

## The voice roster

The library ships 320 human-reviewed voices across 78 native languages — every voice speaks all 80 supported languages; its native one is where its accent lives. Fetch the roster at runtime rather than hardcoding a list; store each voice’s `voice_id` and display its `name`.

```http
GET /v1/voices
```

```json
{
  "voices": [
    {
      "voice_id": "sv_enhdbrj5",
      "name": "Aanya",
      "category": "premade",
      "description": "The first voice Svara learned to love. Warm Hindi storytelling with a patient, late-evening calm.",
      "labels": {
        "native_language": "Hindi",
        "native_language_code": "hi",
        "accent": "indian",
        "quality_band": "A",
        "is_native_source": "true",
        "preview_language": "Hindi"
      },
      "preview_url": "/v1/voices/sv_enhdbrj5/preview"
    },
    ...
  ]
}
```

- `voice_id` is a stable `sv_`-prefixed id; it is the only way to address a voice, on both the OpenAI-style and ElevenLabs-style endpoints
- `labels.native_language` is where the voice’s accent comes from; it still speaks every supported language
- names change, ids don’t — store the `voice_id` and render `name` from the response

> The [console Voices page](https://platform.kenpathlabs.com/dashboard/voices) plays every voice and filters by language and gender, if you want to pick one before writing code.

## Voice previews

Every voice has a bundled preview clip; use it instead of live-synthesizing sample audio (it’s instant and free):

```http
GET /v1/voices/{voice_id}/preview
```

The `preview_url` is included in each voice object from `/v1/voices`, so you rarely construct this URL by hand.

## Languages

The model handles 80 languages and code-switches between them within a single request. Drive language pickers from the languages endpoint:

```http
GET /v1/languages
```

When calling TTS, the `lang` hint accepts any ISO form: `hi`, `hin`, `hindi`, `hi-IN` all resolve. Sending it enables number and unit normalization; omit it to auto-detect from the script. See [Text to speech](https://docs.kenpathlabs.com/text-to-speech.md) for details.
