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.

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-LATEST

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

Example
model: large-highaccuracy-LATEST

templates

  • Type: string

The example utterances used for text adaptation for your application. They are defined within a block scalar using the Speechly Annotation Language syntax.

Example
templates: |
SAL line 1
SAL line 2

intents

  • Type: list

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

Example
intents:
- name: name of intent

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: name of the entity
type: entity data type
input_items: reference to the variable with the imported input list (optional)
output_items: reference to the variable with the imported output list (optional)
Tip

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

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: variable name to which the list is stored
source: the CSV file that contains the list items
field: column index (1-based) of the file containing the list items

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 fruit store.

config.yaml
model: large-highaccuracy-LATEST
templates: >-
amount = [1..99]

*add_to_cart {add} $amount(product_amount) $fruits(product_name)

*set_delivery_date [{schedule} delivery for | delivery on]
$SPEECHLY.DATE(delivery_date)
intents:
- name: add_to_cart
- name: set_delivery_date
entities:
- name: product_name
type: string
- name: product_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