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

# List available voices

> Retrieve a list of available voices from one or all TTS providers. When `provider` is specified, returns voices for that provider only. Otherwise, returns voices from all providers.

Some providers (ElevenLabs, Resemble) require an API key to list voices.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/text-to-speech/text-to-speech.yml get /text-to-speech/voices
openapi: 3.1.0
info:
  title: Text to Speech API
  version: 2.0.0
  description: API for managing Text to Speech.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
tags:
  - name: Text to Speech
    description: Text to Speech operations
paths:
  /text-to-speech/voices:
    get:
      tags:
        - Text To Speech Commands
      summary: List available voices
      description: >-
        Retrieve a list of available voices from one or all TTS providers. When
        `provider` is specified, returns voices for that provider only.
        Otherwise, returns voices from all providers.


        Some providers (ElevenLabs, Resemble) require an API key to list voices.
      operationId: listVoices
      parameters:
        - name: provider
          in: query
          required: false
          description: >-
            Filter voices by provider. If omitted, voices from all providers are
            returned.
          schema:
            type: string
            enum:
              - aws
              - telnyx
              - azure
              - elevenlabs
              - minimax
              - rime
              - resemble
              - xai
        - name: api_key
          in: query
          required: false
          description: >-
            API key for providers that require one to list voices (e.g.
            ElevenLabs).
          schema:
            type: string
      responses:
        '200':
          description: List of available voices.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoicesResponse'
        '400':
          description: Bad request — invalid provider or missing required API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/text-to-speech_ErrorResponse'
        '401':
          description: Authentication failed — missing or invalid API key.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Telnyx from 'telnyx';

            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.textToSpeech.listVoices();

            console.log(response.voices);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            response = client.text_to_speech.list_voices()
            print(response.voices)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.TextToSpeech.ListVoices(context.TODO(), telnyx.TextToSpeechListVoicesParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Voices)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.texttospeech.TextToSpeechListVoicesParams;

            import
            com.telnyx.sdk.models.texttospeech.TextToSpeechListVoicesResponse;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    TextToSpeechListVoicesResponse response = client.textToSpeech().listVoices();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            response = telnyx.text_to_speech.list_voices

            puts(response)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $response = $client->textToSpeech->listVoices(
                apiKey: 'api_key', provider: 'aws'
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx text-to-speech list-voices \
              --api-key 'My API Key'
components:
  schemas:
    VoicesResponse:
      type: object
      description: List of available voices.
      properties:
        voices:
          type: array
          items:
            $ref: '#/components/schemas/Voice'
    text-to-speech_ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: Error code.
              title:
                type: string
                description: Error title.
              detail:
                type: string
                description: Detailed error description.
    Voice:
      type: object
      description: A voice available for text-to-speech synthesis.
      properties:
        provider:
          type: string
          description: The TTS provider.
        name:
          type: string
          description: Voice name.
        voice_id:
          type: string
          description: Voice identifier.
        language:
          type: string
          description: Language code.
        gender:
          type: string
          description: Voice gender.
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````