Skip to main content

config.yaml

The application settings available in Speechly Dashboard are also available through file-based configuration with a config.yaml file.

Overview

The config.yaml file defines a dictionary of key-value pairs that contain definitions for example utterances, model, entities, imports and other settings. Experimental features are usually available through config.yaml only.

When using file-based configuration, it's recommended to store the config file in a folder with your project code, e.g. config/config.yaml. All setting specified in config.yaml file will update the corresponding setting in Speechly Dashboard. See Speechly CLI workflow to learn more.

Available fields

model

  • Type: string
  • Default: large-highaccuracy

Specify which model should be used for your application. See Models and languages to see available models.

Example
model: large-highaccuracy

intents

  • Type: list

Intents for your application. Each intent is defined within a name key.

Example
intents:
- name: add_to_cart # intent name

entities

  • Type: list

Entities and their data types for your application. Each entity has a name, type pair as it's value. See entity data type reference.

Example
entities:
- name: fruit_name # entity name
type: string # entity data type
Tip

When using the lookup entity type, the keys input_items and output_items are required. See Imports and lookups to learn more.

entities:
- name: fruits
type: lookup
input_items: $fruits_spoken # imported input list variable
output_items: $fruits_normalized # imported output list variable

imports

  • Type: list

Imported CSV data for your application. Each import has a name, source, field triplet as it's value. You can specify as many imports as you like.

Example
imports:
- name: fruits # import variable name
source: fruits.csv # the imported CSV file
field: 1 # column index (1-based)

templates

  • Type: string

The example utterances used for text adaptation for your application. Templates are combination of intents, entities and variables, defined within a block scalar using the Speechly Annotation Language syntax.

Example
templates: >-
amount = [1..20]
*add_to_cart add $amount(fruit_amount) $fruits(fruit_name)
*set_delivery_date delivery on $SPEECHLY.DATE(delivery_date)

silence_triggered_segmentation

  • Type: number
  • Default: 0

Duration of silence in milliseconds that creates a new segment. Use increments of 60 for the best end result. Set to 0 to disable silence triggered segmentation.

fast_intent_detector

  • Type: boolean
  • Default: false

Controls intent detection speed. When enabled, the system tries to detect intents faster at the cost of accuracy.

enable_strict_nlu

  • Type: boolean
  • Default: false

Controls NLU tagging accuracy. When enabled, the systems guarantees that if an utterance is present in the configuration, it should be tagged with greater accuracy.

Caution

This is an experimental feature.

non_streaming_nlu

  • Type: boolean
  • Default: false

Controls when intents and entities are returned by the system. By default, intents and entities are returned in a streaming manner while the user is speaking. When enabled, intents and entities are returned only once at the end of the audio stream. This may improve NLU accuracy with complex configurations.

adaptation_audio_package

  • Type: string

Specify which audio adaptation package should be used for audio adaptation.

Enterprise feature

Audio adaptation is available on Enterprise plans.

Example configuration

An example configuration for a simple fruit store.

config.yaml
model: large-highaccuracy
templates: >-
amount = [1..20]
*add_to_cart add $amount(fruit_amount) $fruits(fruit_name)
*set_delivery_date delivery on $SPEECHLY.DATE(delivery_date)
intents:
- name: add_to_cart
- name: set_delivery_date
entities:
- name: fruit_name
type: string
- name: fruit_amount
type: number
- name: delivery_date
type: date_future
imports:
- name: fruits
source: fruits.csv
field: 1
silence_triggered_segmentation: 720
fast_intent_detector: true
enable_strict_nlu: true
adaptation_audio_package: 2f7ef0df-4ea8-4875-9fb2-5b2d65809468
fruits.csv
apples
oranges
bananas
grapefruits
mangos
apricots
peaches