ASR Engine Configuration

Configuration of the ASR Engine and language settings

Introduction

This section will show you how to configure the Automatic Speech Recognition (ASR) engine and language settings for a channel.

There are two ASR engines available for the ASR service:

  • google (Google Cloud Speech-to-Text)
  • speechmatics (Speechmatics)

Configure ASR Engine and Language

Add the selected engine to the channel configuration

{
  "id": "mychannel",
  "name": "My Channel",
  "input":{
    "type":"srt",
    "port":10000
  },
  "language":"en-US",
  "outputs":[
    "webvtt"
  ],
  "engine": "google"
}

If the engine is not specified, the default engine is google.

Google Cloud Speech-to-Text

The language code for the Google ASR engine is in the form ll-CC where ll is the language code and CC is the country code. For example, en-US is English (United States) and es-ES is Spanish (Spain).

Speechmatics

Speechmatics uses the short language code ll, for example, ja is Japanese and es is Spanish. The only exception is for English and Chinese Mandarin, where the expected output should be specified as one of the following: en-GB, en-US, en-AU, cmn-Hans (Simplified), cmn-Hant (Traditional).

Once the desired engine and language has been selected, apply the channel configuration to the API

$ curl -i -u "<username>:<password>" -XPOST -H "Content-Type: application/json" https://<your-id>.asr.agilecontent.com/api/v1/channels -d @mychannel.json

You will receive a 200 OK response with a JSON payload similar to this

{
  "id": "mychannel",
  "name": "My Channel",
  "enabled": true,
  "engine": "google",
  "input": {
    "type": "srt",
    "port": 10000
  },
  "language": "en-US",
  "outputs": [
    "webvtt"
  ],
  "segmentation": {
    "rows": 2,
    "chars_per_row": 40,
    "progressive": false
  }
}