Use with StreamBuilder

How to configure for integration with StreamBuilder

StreamBuilder Configuration

StreamBuilder communicates with ASR over a WebSocket URL that is used both to send audio to ASR and to receive subtitles back. The WebSocket URL is based on the id for your ASR account and have the form wss://<your-id>.asr.agilecontent.com/api/v1/sbapi.

When integrated with StreamBuilder the audio and subtitle track languages are configured in StreamBuilder. The language codes to use are described under ASR Engine. We currently support 2 variants of operation

  1. One audio and one subtitle track with the same language code
  2. When Speechmatic’s ASR engine is used it is also possible to specify the subtitle track langugage as a translated language instead of the original audio language as long as it is a combination supported by Speechmatics.

See the StreamBuilder documentation for details on StreamBuilder configuration.

Configure a StreamBuilder Channel

Channels are configured in ASR to tune ASR settings for a StreamBuilder channel. Create a channel configuration with input type sbapi in a file mychannel.json

{
  "id": "sbchannel",
  "name": "StreamBuilder Channel",
  "input": {
    "type":"sbapi"
  },
  "engine": "google",
  "segmentation": {
    "rows": 2,
    "chars_per_row": 40,
    "progressive": false
  }
}

and apply it to the configuration API with

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

Tune ASR settings by changing the engine and segmentation settings. Note that both the port in the input section and the outputs are unused when integrated with StreamBuilder.

Remove a StreamBuilder Channel

To remove a StreamBuilder channel delete the corresponding resource in the API

$ curl -i -u "<username>:<password>" -XDELETE https://<your-id>.asr.agilecontent.com/api/v1/channels/sbchannel

This will also terminate any active StreamBuilder sessions on the channel.