REST API for Mono (1) Channel

Postman Request

https://www.getpostman.com/collections/879d27cfdbf13366daf7

Request URL

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

Request Method

POST

Headers

Request Parameter (Form Data)

Return Values (JSON)

When speaker diarization is enabled, it will return as follows:

Sample Request

curl --location --request POST 'https://api.iapp.co.th/asr' \
--header 'apikey: {your api key}' \
--form 'file=@"/Users/kobkrit/Desktop/ETC/2ppl.wav"'

Sample Response

[
    {
        "speaker": "SPEAKER_01",
        "speech": [
            {
                "confidence": 0.9536809921264648,
                "transcript": "สวัสดีค่ะฉันเสียงผู้ใหญ่ค่ะ"
            }
        ],
        "start_second": 1.2234375000000002,
        "stop_second": 3.7715625
    },
    {
        "speaker": "SPEAKER_00",
        "speech": [
            {
                "confidence": 0.9589725732803345,
                "transcript": "สวัสดีครับผมเสียงผู้ใหญ่ผู้ชายครับ"
            }
        ],
        "start_second": 5.0878125,
        "stop_second": 8.159062500000001
    }
]

Programming Languages Implementation Examples

var request = require('request');
var fs = require('fs');
var options = {
  'method': 'POST',
  'url': 'https://api.iapp.co.th/asr',
  'headers': {
    'apikey': '{your api key}'
  },
  formData: {
    'file': {
      'value': fs.createReadStream('/Users/kobkrit/Desktop/ETC/small.mp3'),
      'options': {
        'filename': 'small.mp3',
        'contentType': null
      }
    }
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
Node

Last updated