Skip to main content
GET
/
tts
/
voices
List TTS Voices
curl --request GET \
  --url https://api.example.com/tts/voices
{
  "voices": [
    {}
  ],
  "voices[].name": "<string>",
  "voices[].language_codes": [
    "<string>"
  ],
  "voices[].ssml_gender": "<string>",
  "voices[].natural_sample_rate_hertz": 123
}

Overview

Retrieve the list of available Text-to-Speech voices provided by Google Cloud, so you can pick a specific voice_name when calling the /tts endpoint.

Query Parameters

language
string
Optional language filter (e.g. en, es, fr). When provided, only voices that support this language are returned.

Example Request

curl -X GET "https://api.gistmag.co.uk/tts/voices?language=en"

Response

voices
array
Array of voice objects
voices[].name
string
The unique voice identifier (use this value as voice_name in the /tts endpoint)
voices[].language_codes
string[]
List of BCP-47 language codes supported by this voice (e.g. ["en-US"])
voices[].ssml_gender
string
Voice gender as defined by Google Cloud (MALE, FEMALE, NEUTRAL)
voices[].natural_sample_rate_hertz
number
Natural sample rate of the voice in Hz

Example Response

{
  "voices": [
    {
      "name": "en-US-Wavenet-D",
      "language_codes": ["en-US"],
      "ssml_gender": "MALE",
      "natural_sample_rate_hertz": 24000
    },
    {
      "name": "en-US-Wavenet-F",
      "language_codes": ["en-US"],
      "ssml_gender": "FEMALE",
      "natural_sample_rate_hertz": 24000
    }
  ]
}

Usage with /tts

To use a specific voice, pass its name as the voice_name field in the /tts request body.