Project Design
  • 30 May 2024
  • 3 Minutes to read
  • Contributors
  • PDF

Project Design

  • PDF

Article summary

Designing a Data Flow project consists of

  • selecting which services you want to provide with your project
  • preparing the flow of data

In the design pages you will see nodes each of which stands for some specific functionality (ie. service) you may use in your projects. For example you may use "SR Websocket" node if you want to recognize your users' speech, "Emotion" if you want to know when your customers are angry or "Punctuation" node if you want to just add commas, semicolons and such.

Nodes
You shall take a look at the full list and descriptions of readily available nodes Data Flow provides in order to learn what functionality is already under your fingertips. When you feel like you need some other functionality, enrich some results or just quickly integrate with a new external service, you are always welcome to add a custom node of your own. Data Flow provides an easy way to write custom nodes with javascript. You can quickly make a custom node from a template with a few clicks, start manipulating its code and make trials with it.

Node Configuration

In the project design page if you click on any node a dialog will open up showing you the current values in that node configuration (default values if you have not changed them). Note that several instances of a single node type can be used in the project, in such a case each similar node has its own configuration.

image.png

Figure-I shows an example for Vad node configuration.

Flow Of Data

image.png

In the project design page you will see structures similar to Figure-II. Here you can observe interconnected nodes that are working in tandem. With these nodes you can process data received from your customers or you can process and or use data produced by other nodes. For example in Figure-II we see that Emotion node process audio only after the audio has been filtered though Vad module, ie. it only works with parts of audio that actually contain speech. Thanks to this flexible behavior you can design projects that fit exactly to your customers' needs.

Constraints

image.png

Data Flow supports constraints that can be assigned to each node connection. In the project design page, one can assign a Boolean value in JavaScript notation by pressing "F2" after selecting a connection. These variables can then be assigned before runtime by adding them to the "Settings" field under start message. More information about assigning constraints can be found here.

Note

By using constraints, we can make any project change its behavior parametrically. A good example of utilizing constraints is the demo-batch default project. Since each node is assigned a parameter, we can use every combination of nodes and control the output.

Multi Channel Support as a First Class Citizen
Data Flow supports multichannel audio (stereo) and events in a single project. You can design and use separate functionality for each of your channels in a single project.

Suppose you are integrating with a Call Recording system, you know that one of the audio channels belong to your own agents. You know all about your agents, so you do not need age or gender detection in your customer channel.

Data Types
Dataflow module supports two types of data in its projects:

  • Audio : Data consisting of raw/uncompressed audio samples
  • Event : Json formatted events to enable text based data flow

You shall check the documents of each node for detailed information on whether that specific node accepts or generates, audio and/or event data. You may also observe this in project design page. Audio flow connections are represented as green and events are purple. You can observe that arrow lines used for representing the flows are colored similarly.

Project Types
There are two different project types in Data Flow:

Stream
Streaming is baked into the core of Data Flow. As of current version you can perform streaming operations by connecting to Dataflow through websocket. Once you start an operation with Data Flow server you can send your audio in small packages and operate in streaming mode, this let's you receive events immediately as they occur in real-time.

Batch
Batch operations are implemented in terms of streaming actions in Data Flow project design. Batch operations are performed through http POST requests. Once a request has been received all the incoming audio is inserted into the project through entry node, once all the results/events have been populated the response is returned.


Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.