> ## Documentation Index
> Fetch the complete documentation index at: https://smallestai-ff1e543d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Voices & Languages

> List available voices, models, and supported languages via the API.

Query the API to get available voices, models, and languages. Use the REST API or Python SDK.

## Requirements

Before you begin, ensure you have the following:

* Python (3.9 or higher) installed on your machine.
* An API key from the Smallest AI [platform](https://app.smallest.ai/dashboard/settings/apikeys?utm_source=documentation\&utm_medium=text-to-speech).
* The Smallest AI Python SDK installed. If you haven't installed it yet, follow the instructions below:

### Install the SDK

```bash theme={null}
pip install smallestai
```

Set your API key as an environment variable:

```bash theme={null}
export SMALLEST_API_KEY=YOUR_API_KEY
```

## Fetch Available Voices, Models, and Languages

The Smallest AI SDK allows you to query the available languages, voices, and models for your TTS needs. Here's how you can do it:

<CodeGroup>
  ```python python theme={null}
  from smallestai.waves import WavesClient

  def main():
      client = WavesClient(api_key="YOUR_API_KEY")
      
      # Get available languages
      languages = client.get_languages()
      print(f"Available Languages: {languages}")
      
      # Get available voices for the "lightning-v3.1" model
      voices = client.get_voices(model="lightning-v3.1")
      print(f"Available Voices (Model: 'lightning-v3.1'): {voices}")
      
      # Get user-specific cloned voices
      cloned_voices = client.get_cloned_voices()
      print(f"Available Cloned Voices: {cloned_voices}")
      
      # Get available models
      models = client.get_models()
      print(f"Available Models: {models}")

  if __name__ == "__main__":
      main()
  ```
</CodeGroup>

## Explanation of Functions

* `get_languages()`: Retrieves the list of supported languages for Text-to-Speech.
* `get_voices(model="model_name")`: Retrieves the voices available for a specific model (e.g., "lightning-v3.1").
* `get_cloned_voices()`: Fetches all user-specific cloned voices.
* `get_models()`: Retrieves the TTS models on the platform available through API.

## Need Help?

If you have any questions or encounter issues, our community is here to help!

* Join our [Discord server](https://discord.gg/9WtSXv26WE) to connect with other developers and get real-time support.
* Contact us via email: [support@smallest.ai](mailto:support@smallest.ai).
