Skip to main content
Skip table of contents

Voice channel selection

Request

OpenTV Video Platform's enables voice channel selection via Search Facade. You can pass it text from the hardware platform's speech-to-text facility (e.g., Google Assistant) and it will return one or more channels that match the search phrase (in best-to-worst match order). It supports both channel names and numbers. (If there are no matches, no channels are returned.)

To get channels using such text, send a GET request to:

CODE
https://<host>:<port>/search/v1/search?q=<search_phrase>&type=channel

... where search_phrase is the text provided by the text-to-speech facility.

You are recommended to use the platform's slot functionality to match specific phrases. This typically extracts just the channel name or number from a matching spoken phrase, which you can then pass in to the above call as the search phrase.

Headers

  • Authorization: Bearer – bearer token

  • Content-Type: application/json

Mandatory arguments

In this context, the following arguments are mandatory (in the query):

  • search_phrase – the text containing the channel number or name
  • type=channel – specifies that you are searching for a channel

Other arguments

There are other, optional arguments, but most of them are not relevant for this use case. See the Search Facade API documentation for more information.

Example

This request returns channels that match the search phrase:

CODE
https://<host>:<port>/search/v1/search?q=MTV&type=channel

Response

A successful request returns an HTTP 200 status.

Example

The example request above returns a response like this:

CODE
{
    "results": [
        {
            "id": "GLOBAL_60964",
            "title": "MTV HD",
            "locale": "en_US",
            "source": "NAGRA",
            "description": "",
            "categories": [
                "Arts"
            ],
            "devices": [
                "Chrome",
                "IOS",
                "ATV",
                "Android"
            ],
            "providers": [
                "GLOBAL"
            ],
            "start": 1592935338,
            "end": 2224166538,
            "channel": "GLOBAL_60964",
            "channelName": "MTV HD",
            "channelNumber": 81,
            "stationId": "60964",
            "type": "channel"
        },
        {
            "id": "GLOBAL_75077",
            "title": "MTV2 HD",
            "locale": "en_US",
            "source": "NAGRA",
            "description": "",
            "categories": [
                "Arts"
            ],
            "devices": [
                "Chrome",
                "IOS",
                "ATV",
                "Android"
            ],
            "providers": [
                "GLOBAL"
            ],
            "start": 1592935338,
            "end": 2224166538,
            "channel": "GLOBAL_75077",
            "channelName": "MTV2 HD",
            "channelNumber": 121,
            "stationId": "75077",
            "type": "channel"
        },
        {
            "id": "GLOBAL_22561",
            "title": "MTV Classic SD",
            "locale": "en_US",
            "source": "NAGRA",
            "description": "",
            "categories": [
                "Arts"
            ],
            "devices": [
                "Chrome",
                "IOS",
                "ATV",
                "Android"
            ],
            "providers": [
                "GLOBAL"
            ],
            "start": 1592935338,
            "end": 2224166538,
            "channel": "GLOBAL_22561",
            "channelName": "MTV Classic SD",
            "channelNumber": 124,
            "stationId": "22561",
            "type": "channel"
        }
    ],
    "totalRecords": 3
}

See also

For full details of this API, see the Search Facade API documentation.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.