- Print
- PDF
Redirects channels depending on the provided labels in the request.
Parameters:
name | description | default |
---|---|---|
ChannelTags | List of tags for each channel. Each line in this list shows the tags of a single channel. Each line can contain one or more tags, if there are mode than one tag for a channel they should be separated by commas. Comma ( , ) and semicolon ( ; ) characters are forbidden in tags since they are commonly used as separators. |
Inputs
Audio:
All
Events:
All
Outputs
Audio:
All
Events:
All
Supported flow types: stream, batch
Remarks:
Example Project
We use Channel Switch to differentiate services between separate channels. Let's explain the usage of tags with an example. The following image is from an actual project. This project, among other things, detects the emotions of agent audio and also determines the customer's sentiments from its recognized text.
Figure 1:
Figure 2:
Using Tags
The user of this project should provide tag(s) for each channel in the start message. The related part in the start message would look like the following:
{
"Settings":
{
"ChannelTags":[
"customer",
"agent"
]
},
...
}
With this start message the user is declaring that any stereo audio file should be treated the following way:
- the first channel (channel 0) is the "customer"
- the second channel (channel 1) is the "agent"
This project is designed to serve the "agent" with the the topmost channel of Channel Switch output (see Figure-1 and Figure-2). So
- channel-0 (top audio&event outputs of Entry node) will continue its flow as ChannelSwitch's bottom output.
- channel-1 (bottom audio&event outputs of Entry node) will continue its flow as ChannelSwitch's top output.
Note : Tags are just plain strings, using appropriate strings for tags is the designer's responsibility.
Note 2 : For http POST requests, start message is provided in the multiform/data "parameters" part. An example postman request would look like this:
Figure 3: