Skip to main content

🇹🇭 Thai Speech-to-Text (ASR) Base

🇹🇭 ระบบแปลงเสียงพูดภาษาไทยเป็นข้อความ (Base Model)

Version Status

Welcome to Thai ASR Base - our standard Thai Automatic Speech Recognition service. This version offers fast processing speed while maintaining good accuracy for general use cases.

iApp Text to Speech API
Try Demo

Visit our API Portal to test the Text to Speech API with your own voice.

Getting Started

  1. Prerequisites

    • An API key from iApp Technology
    • Audio files in supported formats
    • Supported formats: MP3, WAV, AAC, M4A
    • Maximum file length: No more than 30 minutes
    • Maximum file size: 1GB
  2. Quick Start

    • Fast processing at 0.3 seconds response time
    • High accuracy (85.48% WER accuracy)
    • Support for Thai language
  3. Key Features

    • Text extraction from audio files
    • Speaker diarization
    • Word-level timestamps
    • Fast processing speed
    • Flexible JSON response format
  4. Security & Compliance

    • GDPR and PDPA compliant
    • No data retention after processing
How to get API Key?

Please visit API Portal to view your existing API key or request a new one.

API Reference

Endpoint

POST https://api.iapp.co.th/asr/v3

Headers

  • apikey (required): Your API key for authentication
  • Additional headers are generated by FormData

Request Parameters

ParameterTypeDescription
file*File (.mp3, .wav, .aac, .m4a)Audio file to transcribe (No more than 30 minutes)
chunk_sizeIntegerAudio chunk size (recommended: 7)

Code Examples

Python

    import requests

url = "https://api.iapp.co.th/asr/v3"

payload = {'use_asr_pro': '0', 'chunk_size': '7'}
files=[
('file',('{YOUR_UPLOADED_FILE}',open('{YOUR_UPLOADED_FILE_PATH}','rb'),'application/octet-stream'))
]
headers = {
'apikey': '{YOUR_API_KEY}'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)

Javascript

const axios = require("axios")
const FormData = require("form-data")
const fs = require("fs")
let data = new FormData()
data.append("file", fs.createReadStream("YOUR_UPLOADED_FILE"))
data.append("use_asr_pro", "0") // Set to '1' for iApp ASR PRO
data.append("chunk_size", "7")

let config = {
method: "post",
maxBodyLength: Infinity,
url: "https://api.iapp.co.th/asr/v3",
headers: {
apikey: "{YOUR_API_KEY}",
...data.getHeaders(),
},
data: data,
}

axios
.request(config)
.then((response) => {
console.log(JSON.stringify(response.data))
})
.catch((error) => {
console.log(error)
})

PHP

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.iapp.co.th/asr/v3',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('file'=> new CURLFILE('{YOUR_UPLOADED_FILE}'),
'use_asr_pro' => '0',
'chunk_size' => '7'),
CURLOPT_HTTPHEADER => array(
'apikey: {YOUR_API_KEY}'
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Swift

let parameters = [
[
"key": "file",
"src": "{YOUR_UPLOADED_FILE}",
"type": "file"
],
[
"key": "use_asr_pro",
"value": "0",
"type": "text"
],
[
"key": "chunk_size",
"value": "7",
"type": "text"
]] as [[String: Any]]

let boundary = "Boundary-\(UUID().uuidString)"
var body = Data()
var error: Error? = nil
for param in parameters {
if param["disabled"] != nil { continue }
let paramName = param["key"]!
body += Data("--\(boundary)\r\n".utf8)
body += Data("Content-Disposition:form-data; name=\"\(paramName)\"".utf8)
if param["contentType"] != nil {
body += Data("\r\nContent-Type: \(param["contentType"] as! String)".utf8)
}
let paramType = param["type"] as! String
if paramType == "text" {
let paramValue = param["value"] as! String
body += Data("\r\n\r\n\(paramValue)\r\n".utf8)
} else {
let paramSrc = param["src"] as! String
let fileURL = URL(fileURLWithPath: paramSrc)
if let fileContent = try? Data(contentsOf: fileURL) {
body += Data("; filename=\"\(paramSrc)\"\r\n".utf8)
body += Data("Content-Type: \"content-type header\"\r\n".utf8)
body += Data("\r\n".utf8)
body += fileContent
body += Data("\r\n".utf8)
}
}
}
body += Data("--\(boundary)--\r\n".utf8);
let postData = body


var request = URLRequest(url: URL(string: "https://api.iapp.co.th/asr/v3")!,timeoutInterval: Double.infinity)
request.addValue("{YOUR_API_KEY}", forHTTPHeaderField: "apikey")
request.addValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type")

request.httpMethod = "POST"
request.httpBody = postData

let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
return
}
print(String(data: data, encoding: .utf8)!)
}

task.resume()

Kotlin

val client = OkHttpClient()
val mediaType = "text/plain".toMediaType()
val body = MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("file","{YOUR_UPLOADED_FILE}",
File("{YOUR_UPLOADED_FILE_PATH}").asRequestBody("application/octet-stream".toMediaType()))
.addFormDataPart("use_asr_pro","0")
.addFormDataPart("chunk_size","7")
.build()
val request = Request.Builder()
.url("https://api.iapp.co.th/asr/v3")
.post(body)
.addHeader("apikey", "{YOUR_API_KEY}")
.build()
val response = client.newCall(request).execute()

Java

OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("file","{YOUR_UPLOADED_FILE}",
RequestBody.create(MediaType.parse("application/octet-stream"),
new File("{YOUR_UPLOADED_FILE_PATH}")))
.addFormDataPart("use_asr_pro","0")
.addFormDataPart("chunk_size","7")
.build();
Request request = new Request.Builder()
.url("https://api.iapp.co.th/asr/v3")
.method("POST", body)
.addHeader("apikey", "{YOUR_API_KEY}")
.build();
Response response = client.newCall(request).execute();

Dart

var headers = {
'apikey': '{YOUR_API_KEY}'
};
var request = http.MultipartRequest('POST', Uri.parse('https://api.iapp.co.th/asr/v3'));
request.fields.addAll({
'use_asr_pro': '0',
'chunk_size': '7'
});
request.files.add(await http.MultipartFile.fromPath('file', '{YOUR_UPLOADED_FILE'));
request.headers.addAll(headers);

http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}

Accuracy and Performance

Overall Accuracy

Benchmark results on Thai Testset from Mozilla Common Voice dataset. We evaluated iApp ASR performance across two different versions of the test set.

  • Test Conditions

    1. Unseen dataset
    2. Thai language only
    3. Speaker diversity: Male, Female, Children
  • Mozilla Common Voice 16.1 Thai Test Set (Version 1)

    Visit the Dataset on Hugging Face

    Results:

    • Test Set Size: 11,038 test examples
    • Average Word Error Rate: 1.11%
    • Average Word Error Rate (No Space): 0.66%
  • Mozilla Common Voice 17.0 Thai Test Set (Version 2)

    Visit the Dataset on Hugging Face

    Results:

    • Test Set Size: 11,042 samples
    • Word Error Rate (WER): 14.52%
    • Character Error Rate (CER): 5.87%
    • Accuracy based on WER: 85.48%
    • Accuracy based on CER: 94.13%

Processing Speed

  • Response Time Average: 0.3 seconds
  • Up to 15x faster than other vendors

Detailed Benchmark Results (in Google Sheets):

Benchmark Result of iApp ASR Base

Pricing

AI API Service NameEndpointIC Per SecondsOn-Premise
Thai Speech To Text (ASR) iapp-asr-v3-en [Base Model]1 IC/60 SecondsContact
iapp-asr-v3-th-en [Base Model]1 IC/60 Seconds