Tts Sync Api
curl --request POST \
--url http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/tts \
--header 'Content-Type: application/json' \
--header 'chariotai-api-key: <api-key>' \
--data '
{
"voice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"model_type": "v0"
}
'import requests
url = "http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/tts"
payload = {
"voice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"model_type": "v0"
}
headers = {
"chariotai-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'chariotai-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
voice_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
text: '<string>',
model_type: 'v0'
})
};
fetch('http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/tts', 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 => "http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/tts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'voice_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'text' => '<string>',
'model_type' => 'v0'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"chariotai-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/tts"
payload := strings.NewReader("{\n \"voice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"model_type\": \"v0\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("chariotai-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/tts")
.header("chariotai-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"voice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"model_type\": \"v0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/tts")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["chariotai-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"voice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"model_type\": \"v0\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Endpoints
Text to Speech
POST
/
v1
/
tts
Tts Sync Api
curl --request POST \
--url http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/tts \
--header 'Content-Type: application/json' \
--header 'chariotai-api-key: <api-key>' \
--data '
{
"voice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"model_type": "v0"
}
'import requests
url = "http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/tts"
payload = {
"voice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"model_type": "v0"
}
headers = {
"chariotai-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'chariotai-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
voice_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
text: '<string>',
model_type: 'v0'
})
};
fetch('http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/tts', 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 => "http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/tts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'voice_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'text' => '<string>',
'model_type' => 'v0'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"chariotai-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/tts"
payload := strings.NewReader("{\n \"voice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"model_type\": \"v0\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("chariotai-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/tts")
.header("chariotai-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"voice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"model_type\": \"v0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/tts")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["chariotai-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"voice_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"model_type\": \"v0\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}The Text-to-Speech (TTS) API converts text into natural-sounding speech and supports a wide range of Indian languages. This makes it ideal for various use cases, including creating voiceovers for multimedia, enhancing accessibility in applications, providing spoken directions in navigation systems, and facilitating interactive customer service.
Authorizations
Use the API key generated from our website to programmatically interact with our endpoints. This key authorizes your requests, allowing you to access and utilize our services securely.
Body
application/json
Response
Successful Response
⌘I