Dasha platformApplication

Application configuration

Application configuration contains two parts

  1. Global application configuration, that is described in .dashaapp file
  2. Session configuration, that describes part of configuration related to dialogue instance

Global configuration

The global configuration is stored in the .dashaapp file and contains

Application name

Mandatory lowercase name of an application, required to identify your application

Dialogue configuration

Mandatory section, that describes where to find your conversational model

  • path to main DashaScript file with your conversational model
  • path to view file, that describes how to render your model in UI

NLG Section

Optional section, that describes where to find the configuration of NLG module of your dialogue

NLU Section

The optional section determines how an application understands natural language.

Properties

PropertyTypeDescription
skillsstring[]List of skills used by the application to extract meaning from natural language.
languagestringBCP 47 language tag denoting a target language (e. g. "en-US").
customIntentsCustomIntentsIncludeConfig?Definition of custom intents.
disabledIntentBySkillDisabledIntentBySkill?Specific intents disabled from concrete skills while processing message.
disabledDataFactBySkillDisabledDataFactBySkill?Specific data facts disabled from concrete skills while processing message.

Disabled intent by skill

Description of which intents should not be allocated from certain skills.

DisabledIntentBySkill - is a map of string representation of skill and array of string representation of intents which shoud not be extracted.

Disabled data fact by skill

Description of which data facts should not be allocated from certain skills.

DisabledDataFactBySkill - is a map of string representation of skill and array of string representation of data facts which shoud not be extracted.

Custom model include configuration

Configuration of custom model. Information required to customize the extraction of meaning from natural language text.

Properties

PropertyTypeDescription
filestringPath to the file containing custom intents and/or entities.

Example of .dashaapp file

{ "formatVersion": "2", "nlu": { "skills": [ "common_phrases", "common-parser", "sentiment" ], "customIntents": { "file": "data.json" }, "disabledIntentBySkill": { "common_phrases": [ "how_do_you_do" ] }, "language": "en-US" }, "nlg": { "type": "phrases", "file": "phrasemap.json" }, "dialogue": { "file": "main.dsl", "view": "view.json" }, "name": "appname", "description": "description" }

Session configuration

Session configuration is passed to Dasha Cloud Platform after passing your application to Dasha and helps you in creating Dialogue agnostic to a communication protocol (from Dasha to end-user)

Configuration for text connection

This configuration allows the application to exchange text messages with the interlocutor. This is usable for chat-like applications.

Example

An example session config using a textual connection:

{ "type": "text" }

An example of adding a session config using SDK:

await app.addSessionConfig( { name: "text", // Name for session configuration config: { type: "text" // Type of session configuration } } );

Properties

PropertyTypeDescription
typestringType of session config for text session. Value is "text"

Configuration for audio connection

This configuration allows the application to exchange audio messages with the interlocutor. It specifies such parameters as:

  • Setting the connection type of the audio channel
  • Setting the conversion of the audio channel to text
  • Setting the conversion of text to the audio channel
  • Tuning voice activity detection in the audio channel
  • Adjusting added noise on the outgoing audio channel

Example

An example of a session config using an audio connection with default parameters:

{ "type": "audio", "channel": { "type": "sip", "configName": "default" }, "stt": { "configName": "Default" }, "tts": { "type": "synthesized", "configName": "Default" }, "vad":{ "delayAtStartup": 1.0, "interlocutorPauseDelay": 0.8 }, "noiseVolume": 0.5 }

An example of adding a session config using SDK:

await app.addSessionConfig( { name: "audio-default", // Name for session configuration config: { type: "audio", // Type of session configuration channel: { type: "sip", configName: "default" }, stt: { configName: "Default" }, tts: { type: "synthesized", configName: "Default" }, vad: { delayAtStartup: 1.0, interlocutorPauseDelay: 0.8 }, noiseVolume: 0.5 } } );

Remarks

Recommended value for "noiseVolume" 0.1-0.3. Default value is 0.5.

Default value for "channel":

{ "type": "sip", "configName": "default" }

Default value for "vad":

{ "delayAtStartup": 1.0, "interlocutorPauseDelay": 0.8 }

Speech-to-text configuration (SpeechToTextConfig)

Configuration for the used method of converting audio to text.

Properties

PropertyTypeDescription
configNamestringName of registered configuration for speech recognition. Available options are "Default" and "Default-en".

Text-to-speech configuration (TextToSpeechConfig)

Configuration of the used method of converting text to audio.

Remarks

The parameters for this configuration depend on the selected speech synthesis. Default value for "variation" is 0. Default value for "speed" is 1.0.

Properties

PropertyTypeDescription
typestringNow, the only supported value is "synthesized". This means, that audio phrases are synthesized from the text.
configNamestringName of registered configuration for speech synthesis. Available options are: "Default", "Dasha"
speakerstring?Speaker used for pronunciation.
languagestring?Pronunciation language.
emotionstring?Emotion of text pronunciation. For example, "Neutral", "Good", "Evil", etc.
speednumber?Speaking rate multiplier relative to base speed. Non-negative double.
variationnumber?Unique variant of the pronunciation of phrases provided that the text and other parameters of voice configuration match. Non-negative integer.

Voice activity detection configuration (VoiceActivityDetectionConfig)

Responsible for setting the voice detection in the audio input channel.

Remarks

Default value for "delayAtStartup" is 1 second. Default value for "interlocutorPauseDelay" is 0.8 seconds.

Setting this section with parameters other than the default values can lead to unpredictable consequences.

Properties

PropertyTypeDescription
delayAtStartupnumberDelay in seconds between establishing an audio channel and starting of Voice Activity Detector. It is necessary for the correct processing of the audio channel, due to the lack of data at the beginning of the audio track. Must be non-negative.
interlocutorPauseDelaynumberLength of expected pause in seconds at the end of human speech. Too big of a value will lead to long pauses before an answer. Too small of a value will lead to errors in speech recognition. Must be non-negative.

Outbound SIP Connection configuration

This configuration describes outgoing telephony.

Remarks

Default value for "register" is false.

Properties

PropertyTypeDescription
serverstringRemote sip server (see hostport parameter)
domainstring?Host parameter
accountstringAccount username (see user parameter)
passwordstring?Account password (see password parameter)
registerbooleanDenotes if the registration on a server is required.
registerRefreshnumber?Re-registration period in seconds.

Inbound SIP Connection configuration

This configuration describes incoming telephony.

Remarks

The call will be expected on "account@your_customer_id.sip.dasha.ai".

Properties

PropertyTypeDescription
accountstringAccount username (see user parameter).
passwordstringAccount password (see password parameter).
ipAclstring[]List of IP addresses or IP masks (e. g. 10.0.1.0/24) you can work with.
prioritynumberAn integer from 0 to 7. The job with a higher priority will be processed earlier.

Connection system intents

  1. Select skills list, that contains intents selected in System intents document
  2. Add skills to nlu.skills list in .dashaapp file
  3. Start your application and enjoy NLU!

Connecting custom intents

  1. Create data.json file in one folder with your .dashaapp file

  2. Add custom intents and/or custom entities to data.json

  3. Add path to dataset file data.json to section nlu.customIntents in dashaapp file

    "customIntents": { "file": "data.json" }
  4. Start your application and enjoy NLU!

  5. Improve your model to achieve better results - Improving models

Example of dashaapp file (project.dashaapp):

{ "formatVersion": "2", "name": "cool-project", "description": "", "nlu": { "skills": [ "common_phrases", "sentiment" ], "language": "en-US", "customIntents": { "file": "data.json" } }, "nlg": { "type": "phrases", "file": "phrasemap.json", "signatureFile": "phrasemapSignature.json" }, "dialogue": { "file": "main.dsl", "view": "view.json" } }
Found a mistake? Email us, and we'll send you a free t-shirt!

Enroll in beta

Request invite to our private Beta program for developers to join the waitlist. No spam, we promise.