API Documentation
Thai TTS API Request
Kaitom Voice Request
Kaitom Voice
GET
https://api.iapp.co.th/thai-tts-kaitom/tts
Query Parameters
Name
Type
Description
text*
String
Thai-English Text/Sentence Input
Headers
Name
Type
Description
apikey*
String
Your API Key to call this API
Response as audio output. You can save response as a file. The extension can be .mpga, etc)
Kaitom Voice Sample Used Option and Fields Parameter
curl --location --request GET 'https://api.iapp.co.th/thai-tts-kaitom/tts?text={Your Text}' \
--header 'apikey: {Your API Key}'
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://api.iapp.co.th/thai-tts-kaitom/tts?text={Your Text}")
.header("apikey", "{Your API Key}")
.asString();
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api.iapp.co.th/thai-tts-cee/tts?text={Your Text}',
'headers': {
'apikey': '{Your API Key}'
},
form: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
#import <Foundation/Foundation.h>
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.iapp.co.th/thai-tts-kaitom/tts?text={Your Text}"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
NSDictionary *headers = @{
@"apikey": @"{Your API Key}"
};
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
dispatch_semaphore_signal(sema);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSError *parseError = nil;
NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
NSLog(@"%@",responseDictionary);
dispatch_semaphore_signal(sema);
}
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://api.iapp.co.th/thai-tts-kaitom/tts?text={Your Text}');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'apikey' => '{Your API Key}'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
import requests
url = "https://api.iapp.co.th/thai-tts-kaitom/tts?text={Your Text}"
payload={}
headers = {
'apikey': '{Your API Key}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Cee Thai Celebrity Voice Request
Cee Thai Celebrity Voice
GET
https://api.iapp.co.th/thai-tts-cee/tts
Query Parameters
Name
Type
Description
text*
String
Thai-English Text/Sentence Input
Headers
Name
Type
Description
apikey*
String
Your API Key to call this API
Response as audio output. You can save response as a file. The extension can be .mpga, etc)
Cee Voice Sample Used Option and Fields Parameter
curl --location --request GET 'https://api.iapp.co.th/thai-tts-cee/tts?text={Your Text}' \
--header 'apikey: {Your API Key}'
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://api.iapp.co.th/thai-tts-cee/tts?text={Your Text}")
.header("apikey", "{Your API Key}")
.asString();
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api.iapp.co.th/thai-tts-cee/tts?text={Your Text}',
'headers': {
'apikey': '{Your API Key}'
},
form: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
#import <Foundation/Foundation.h>
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.iapp.co.th/thai-tts-cee/tts?text={Your Text}"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
NSDictionary *headers = @{
@"apikey": @"{Your API Key}"
};
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
dispatch_semaphore_signal(sema);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSError *parseError = nil;
NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
NSLog(@"%@",responseDictionary);
dispatch_semaphore_signal(sema);
}
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://api.iapp.co.th/thai-tts-cee/tts?text={Your Text}');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'apikey' => '{Your API Key}'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
import requests
url = "https://api.iapp.co.th/thai-tts-cee/tts?text={Your Text}"
payload={}
headers = {
'apikey': '{Your API Key}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Last updated