API Documentation

Thai Language πŸ‡ΉπŸ‡­

Endpoint

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

Example Code Using Node.js

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'));

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);
});

Parameters

Header

API Key * String Your API key to call this API

Body

query * String The question string that you need to input to API

Response

🟒 200: OK Sample Response when request has succeeded

Return Value

Example JSON Response

{
    "output": [
        {
            "text": "ΰΈͺΰΈ§ΰΈ±ΰΈͺΰΈ”ΰΈ΅ΰΈ„ΰΉˆΰΈ° ΰΈŠΰΈ±ΰΉ‰ΰΈ™ΰΉ€ΰΈͺΰΈ΅ΰΈ’ΰΈ‡ΰΈœΰΈΉΰΉ‰ΰΉƒΰΈ«ΰΈΰΉˆΰΈ„ΰΉˆΰΈ°",
            "speaker": "SPEAKER_01",
            "start": 0.009,
            "end": 2.944,
            "segment": 0
        },
        {
            "text": "ΰΈͺΰΈ§ΰΈ±ΰΈͺΰΈ”ΰΈ΅ΰΈ„ΰΈ£ΰΈ±ΰΈš ΰΈœΰΈ‘ΰΉ€ΰΈͺΰΈ΅ΰΈ’ΰΈ‡ΰΈœΰΈΉΰΉ‰ΰΉƒΰΈ«ΰΈΰΉˆ ΰΈœΰΈΉΰΉ‰ΰΈŠΰΈ²ΰΈ’ΰΈ„ΰΈ£ΰΈ±ΰΈš",
            "speaker": "SPEAKER_00",
            "start": 4.104,
            "end": 7.5,
            "segment": 1
        }
    ],
    "audio_duration_in_seconds": 7.629,
    "uploaded_filename": "2ppl (3).wav",
    "processing_time_in_seconds": 0.4989287853240967
}

English Language πŸ‡ΊπŸ‡Έ

Endpoint

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

Example Code Using Node.js

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'));

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);
});

Parameters

Header

API Key * String Your API key to call this API

Body

query * String The question string that you need to input to API

Response

🟒 200: OK Sample Response when request has succeeded

Return Value

Example JSON Response

{
    "output": [
        {
            "text": " Hello, I'm Siang Poo Yai.",
            "speaker": "SPEAKER_01",
            "start": 0.009,
            "end": 2.944,
            "segment": 0
        },
        {
            "text": " Hello, I'm a grown man.",
            "speaker": "SPEAKER_00",
            "start": 4.104,
            "end": 7.5,
            "segment": 1
        }
    ],
    "audio_duration_in_seconds": 7.629,
    "uploaded_filename": "2ppl (3).wav",
    "processing_time_in_seconds": 0.37958788871765137
}

Last updated