List TTS Voices
curl --request GET \
--url https://api.example.com/tts/voicesimport requests
url = "https://api.example.com/tts/voices"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/tts/voices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/tts/voices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/tts/voices"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/tts/voices")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/tts/voices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"voices": [
{}
],
"voices[].name": "<string>",
"voices[].friendly_name": "<string>",
"voices[].language_codes": [
"<string>"
],
"voices[].ssml_gender": "<string>",
"voices[].natural_sample_rate_hertz": 123,
"voices[].model": "<string>"
}Text-to-Speech
List TTS Voices
List available Text-to-Speech voices across both engines
GET
/
tts
/
voices
List TTS Voices
curl --request GET \
--url https://api.example.com/tts/voicesimport requests
url = "https://api.example.com/tts/voices"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/tts/voices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/tts/voices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/tts/voices"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/tts/voices")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/tts/voices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"voices": [
{}
],
"voices[].name": "<string>",
"voices[].friendly_name": "<string>",
"voices[].language_codes": [
"<string>"
],
"voices[].ssml_gender": "<string>",
"voices[].natural_sample_rate_hertz": 123,
"voices[].model": "<string>"
}Overview
Retrieve the list of available Text-to-Speech voices across both engines, so you can pick a specificvoice_name when calling the /tts endpoint.
Each entry carries a provider field — "kitten" for the local English engine (listed first for English) or "google" for Google Cloud TTS.
Query Parameters
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
array
Array of voice objects
string
The unique voice identifier (use this value as
voice_name in the /tts endpoint). This is the technical voice code (e.g., en-US-Neural2-F).string
A human-readable name for the voice (e.g.,
US English Neural2 (Female)). Use this for display purposes in your UI.string[]
List of BCP-47 language codes supported by this voice (e.g.
["en-US"])string
Voice gender (
MALE, FEMALE, NEUTRAL)number
Natural sample rate of the voice in Hz
string
The voice model type (e.g.,
Neural2, Neural, Studio, News, WaveNet, Standard). Neural2 and Neural models provide higher quality, more natural-sounding speech.Example Response
{
"voices": [
{
"name": "en-US-Neural2-F",
"friendly_name": "US English Neural2 (Female)",
"language_codes": ["en-US"],
"ssml_gender": "FEMALE",
"natural_sample_rate_hertz": 24000,
"model": "Neural2"
},
{
"name": "en-US-Wavenet-D",
"friendly_name": "US English WaveNet (Male)",
"language_codes": ["en-US"],
"ssml_gender": "MALE",
"natural_sample_rate_hertz": 24000,
"model": "WaveNet"
}
]
}
Understanding Voice Names
Voice names follow a pattern that encodes important information:Voice Code Format
Voice codes follow the format:{language}-{locale}-{model}-{gender}
- Language: Language code (e.g.,
enfor English) - Locale: Regional variant (e.g.,
US,GB,AUfor US English, British English, Australian English) - Model: Voice model type (e.g.,
Neural2,Neural,WaveNet,Standard) - Gender:
F(Female),M(Male), orA(Any/Neutral)
Examples
en-US-Neural2-F→ US English Neural2 (Female): High-quality neural voice with US accent, female genderen-GB-Neural-D→ British English Neural (Male): Neural voice with British accent, male genderen-AU-Standard-B→ Australian English Standard (Any): Standard quality voice with Australian accent
Voice Properties
Locales indicate the regional accent:US- United States EnglishGB- British EnglishAU- Australian EnglishCA- Canadian EnglishIN- Indian EnglishIE- Irish EnglishNZ- New Zealand EnglishZA- South African English
Neural2- Latest high-quality neural voices (recommended)Neural- High-quality neural voicesWaveNet- Advanced WaveNet voicesStudio- Professional studio-quality voicesNews- News broadcaster style voicesStandard- Standard quality voices (faster, lower cost)
en-IN-Chirp, en-IN-Neural2, en-GB-Neural2, en-GB-Chirp, en-AU-Neural2, and en-AU-Chirp) are not available as they are incompatible with the current API version.
Usage with /tts
To use a specific voice, pass its name as the voice_name field in the /tts request body.