Skip to main content
GET
/
text-to-speech
/
voices
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

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

console.log(response.voices);
{
  "voices": [
    {
      "id": "<string>",
      "name": "<string>",
      "provider": "<string>",
      "label": "<string>",
      "accent": "<string>",
      "gender": "<string>",
      "age": "<string>",
      "language": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

provider
enum<string>

Filter voices by provider

Available options:
aws,
azure,
elevenlabs,
telnyx
elevenlabs_api_key_ref
string

Reference to your ElevenLabs API key stored in the Telnyx Portal

Response

Successful response with list of available voices

voices
object[]