apikey (required): Your API key to authenticate the request.
Additional headers are generated dynamically by the FormData object in the request.
Request Body
Name
Type
Description
file (required): The audio or video file to be processed. The file should be uploaded in binary form using a file stream (Only .mp3, .wav , .acc , .m4a No More than 5 minutes Contact Sales for further information ).
use_asr_pro (Optional): Indicates which version of the ASR engine to use.
0: Use the default iApp ASR Version (faster ⚡️).
1: Use the iApp ASR PRO Version (more accurate and context-aware ☀️).
chunk_size (required): Size of audio chunk to transcript. It will effect to length of transciption segments. It means if you set a high chunk size, it will reduce the number of segments. We recommend for optimal chunk size is 7.
Response from iApp ASR
Upon success, the API will return a JSON object containing the transcription of the provided audio or wav file.
Example Code Using NodeJS-Axios and Python-Requests
iApp ASR (Default Version)
constaxios=require('axios');constFormData=require('form-data');constfs=require('fs');let data =newFormData();data.append('file',fs.createReadStream('YOUR_UPLOADED_FILE'));data.append('use_asr_pro','0'); // Set to '1' for iApp ASR PROdata.append('chunk_size','20');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);});
constaxios=require('axios');constFormData=require('form-data');constfs=require('fs');let data =newFormData();data.append('file',fs.createReadStream('YOUR_UPLOADED_FILE'));data.append('use_asr_pro','1'); // Set to '0' for iApp ASR Defaultlet 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);});