> ## Documentation Index
> Fetch the complete documentation index at: https://docs.audixa.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Voice Library

> Browse and select voices for your text-to-speech projects

Audixa offers a diverse library of high-quality voices. This guide explains how to browse, select, and use voices in your API requests.

## Voice Models

Audixa provides two model tiers:

| Model        | Description                              | Use Case                                  |
| ------------ | ---------------------------------------- | ----------------------------------------- |
| **Base**     | Standard high-quality voices             | General TTS, high volume, cost-effective  |
| **Advanced** | Premium voices with cloning and emotions | Custom voices, expressive speech, dubbing |

## Listing Voices via API

Fetch available voices using the `/voices` endpoint:

<CodeGroup>
  ```bash cURL theme={null}
  # Get Base model voices
  curl -X GET "https://api.audixa.ai/v3/voices?model=base" \
    -H "x-api-key: YOUR_API_KEY"

  # Get Advanced model voices
  curl -X GET "https://api.audixa.ai/v3/voices?model=advanced" \
    -H "x-api-key: YOUR_API_KEY"
  ```

  ```python Python theme={null}
  import audixa

  audixa.set_api_key("YOUR_API_KEY")

  # Get Base model voices
  voices = audixa.list_voices(model="base")
  for voice in voices:
      print(f"{voice['name']} ({voice['voice_id']}) - {voice.get('accent', 'N/A')}")

  # Get Advanced model voices
  advanced_voices = audixa.list_voices(model="advanced")
  ```

  ```typescript TypeScript theme={null}
  import Audixa from 'audixa';

  const audixa = new Audixa('YOUR_API_KEY');

  // Get Base model voices
  const { voices } = await audixa.getVoices({ model: 'base' });
  for (const voice of voices) {
    console.log(`${voice.name} (${voice.voice_id}) - ${voice.accent ?? 'N/A'}`);
  }
  ```

  ```javascript JavaScript theme={null}
  import Audixa from 'audixa';

  const audixa = new Audixa('YOUR_API_KEY');

  // Get Base model voices
  const { voices } = await audixa.getVoices({ model: 'base' });
  voices.forEach(voice => {
    console.log(`${voice.name} (${voice.voice_id}) - ${voice.accent || 'N/A'}`);
  });
  ```
</CodeGroup>

<Note>
  The `model` query parameter is optional. Use `base` or `advanced` to filter.
</Note>

## Response Format

<ResponseExample>
  ```json Voice List Response theme={null}
  {
    "limit": 100,
    "offset": 0,
    "length": 3,
    "voices": [
      {
        "voice_id": "am_ethan",
        "name": "Ethan",
        "gender": "Male",
        "accent": "American",
        "description": "Clear, professional male voice"
      },
      {
        "voice_id": "af_luna",
        "name": "Luna",
        "gender": "Female",
        "accent": "British",
        "description": "Warm, friendly British female voice"
      }
    ]
  }
  ```
</ResponseExample>

## Voice Properties

Each voice object includes:

| Property      | Type    | Description                                 |
| ------------- | ------- | ------------------------------------------- |
| `voice_id`    | string  | Unique identifier to use in `/tts` requests |
| `name`        | string  | Human-friendly voice name                   |
| `gender`      | string  | `Male` or `Female`                          |
| `accent`      | string  | Voice accent/language (e.g., "American")    |
| `description` | string  | Brief description of voice characteristics  |
| `free`        | boolean | Whether the voice is free to use            |
| `is_custom`   | boolean | Whether this is your custom voice           |

## Using a Voice

Once you've selected a voice, use its `voice_id` in your TTS request:

```json theme={null}
{
  "text": "Hello, this is a test.",
  "voice_id": "am_ethan",
  "model": "base"
}
```

<Warning>
  Make sure the `model` in your TTS request matches the model the voice belongs to.
</Warning>

## Custom Voices (Advanced Model)

With the **Advanced** model, you can:

<CardGroup cols={2}>
  <Card title="Clone Your Voice" icon="clone">
    Create a custom voice from audio samples.
  </Card>

  <Card title="Adjust Emotions" icon="face-smile">
    Control emotional tone via `exaggeration` and `cfg_weight`.
  </Card>

  <Card title="Fine-tune Settings" icon="sliders">
    Adjust expressiveness for creativity control.
  </Card>

  <Card title="Branded Voices" icon="building">
    Create unique voices for your brand.
  </Card>
</CardGroup>

Custom voices appear in your `/voices?model=advanced` response with `is_custom: true`.

## Voice Selection Tips

1. **Match your audience**: Choose accents that resonate with your target users
2. **Consider context**: Professional content may need authoritative voices; casual content benefits from friendly tones
3. **Test before production**: Generate samples with different voices before committing
4. **Check the dashboard**: The [Voice Library](https://audixa.ai/dashboard/library) lets you preview voices interactively

## Browse in Dashboard

For an interactive experience with audio previews:

<Card title="Voice Library Dashboard" icon="users" href="https://audixa.ai/dashboard/library">
  Browse, preview, and compare all available voices.
</Card>
