Supported Languages
curl --request GET \
--url https://api.example.com/tts/languagesimport requests
url = "https://api.example.com/tts/languages"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/tts/languages', 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/languages",
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/languages"
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/languages")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/tts/languages")
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{
"languages": {}
}Text-to-Speech
Supported Languages
Get a list of all supported languages for Text-to-Speech
GET
/
tts
/
languages
Supported Languages
curl --request GET \
--url https://api.example.com/tts/languagesimport requests
url = "https://api.example.com/tts/languages"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/tts/languages', 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/languages",
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/languages"
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/languages")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/tts/languages")
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{
"languages": {}
}
Retrieve a list of all supported languages for the Text-to-Speech API.
Request
No parameters required.Response
object
Object mapping language codes to language names
Example Request
curl -X GET https://api.gistmag.co.uk/tts/languages
const response = await fetch('https://api.gistmag.co.uk/tts/languages');
const data = await response.json();
console.log(data.languages);
// {
// "en": "English (US)",
// "es": "Spanish (Spain)",
// ...
// }
import requests
response = requests.get('https://api.gistmag.co.uk/tts/languages')
data = response.json()
print(data['languages'])
Example Response
{
"languages": {
"en": "English (US)",
"es": "Spanish (Spain)",
"fr": "French (France)",
"de": "German",
"it": "Italian",
"pt": "Portuguese (Brazil)",
"ja": "Japanese",
"ko": "Korean",
"zh": "Chinese (Mandarin, simplified)"
}
}
Supported Languages
- en - English (US)
- es - Spanish (Spain)
- fr - French (France)
- de - German
- it - Italian
- pt - Portuguese (Brazil)
- ja - Japanese
- ko - Korean
- zh - Chinese (Mandarin, simplified)
Notes
- Language codes follow ISO 639-1 standard
- Use these codes in the
languageparameter for TTS endpoints - Each language has multiple voice options available (see Voices)