- Print
- PDF
Entry point of events that are sent by external sources.
In a typical use case, a client starts an operation with Data Flow and any event it sends enter the project through the Entry node.
In some use cases (eg. Voice Biometrics), you may want to send some extra information to an existing Data Flow session from an another service.
Data Flow provides a way to send events to existing sessions through its http API. These events enter the project through External Relay. Note that there can be at most one External node in a project.
Parameters:
none
Inputs
Audio:
None
Events:
All
Outputs
Audio:
None
Events:
All
Remarks:
Data Flow provides sessions
http endpoint for sending events to existing sessions. The user must send a POST request to this endpoint. A header with name SessionId
should contain the id of the session that the contents of this request will be delivered to.
Content-Type
should be application/json
and http message content should contain an event.
eg.
{
"Event":
{
"StartMsec": 0,
"EndMsec": 0,
"Channel": "0",
"Name": "GreatEvent",
"Data":
{
"ImportantInfo": "whatever",
"SomeOtherInfo": 9
},
"GroupId": "rher456"
}
}
Retrieving Session Id:
From Websocket Response
In order to send events to External Node one needs a SessionId.
Session Id is provided to the client in the StartResponse message, so the client may share Session Id with a useful external service.
From Custom nodes
Custom nodes can access Session Id by using SessionInfo.id()
.
Project Structure
External Relay can be used just like the Entry node. However, it can only be used for raising Event
's. Which means it can be used as a substitute for almost any node. In the case below, it is used for raising Language Change
events during runtime.
In the example below, External Relay is used to transmit VBStreamState
event to VB Realtime. This is a prerequisite for VB Realtime to work.
Supported flow types: Stream, Batch