đŸ‡ē🇸English ASR

ASR API Document for English

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