Platform Configuration

You may want to set up more precisely your Snips platform, using the following components options.

The configuration file of the platform is located by default at /etc/snips.toml.

It contains various general parameters for the whole platform and specific parameters for each component.

Every component first looks in its own section, or fallbacks on snips-common or else use the default value.

Ultimately, it is also possible to configure the options using the command line interface when starting a component. Command line options superseed the ones defined in the configuration file.

For a given component option, the priority order is the following:

Priority

Configuration Entry

Description

1

Command Line Interface

Executing component-name --option-name some_value

2

Specific Config Section

Located in [<component-name>] section

3

Common Config Section

Located [snips-common] section

4

No configuration

Use the component hard coded default value

Common parameters : snips-common

Key

Type

Default Value

Description

assistant

option

/usr/share/snips/assistant

location of the assistant folder

audio

option

["+@mqtt"]

list of audio servers to listen to, '+@mqtt' means all MQTT-bound audio-servers

bus

option

mqtt

transport, only mqtt is supported for the moment

mqtt

option

localhost:1883

address:port of the mqtt broker

mqtt_username

option

mqtt username

mqtt_password

option

mqtt password

mqtt_tls_hostname

option

mqtt TLS hostname (activates TLS options)

mqtt_tls_disable_root_store

option

false

disable built-in Certificate bundle store

mqtt_tls_cafile

option

PEM file containing one or several root certificate to trust

mqtt_tls_capath

option

Folder of PEM files containing root certificates to trust

mqtt_tls_client_cert

option

Client certificate chain in PEM form

mqtt_tls_client_key

option

Client private key in PEM form

user_dir

option

/var/lib/snips

user folder

verbose

option

info

verbosity level (info, debug, trace)

Audio Server parameters : snips-audio-server

Key

Type

Default Value

Description

alsa_capture

option

ALSA default

Use the specified ALSA device instead of the default as a source

alsa_playback

option

ALSA default

Use the specified ALSA device instead of the default as a playback

bind

option

mqtt

sound streaming over mqtt (address like "somewhere@mqtt") or tcp (address like 0.0.0.0:26300)

disable_capture

option

false

Disable audio capture for this server

disable_playback

option

false

Disable audio playback for this server

frame

option

256

number of samples per frame

hijack

flag

false

Disable audio capture for this server

mike

option

Built-in Microphone

name of the audio input to grab

no-mike

tag

false

Use a silent source instead of a mike (requires hijack)

portaudio_capture

option

ALSA default

Use the specified PortAudio device instead of the default as a source

portaudio_playback

option

ALSA default

Use the specified PortAudio device instead of the default as a playback

Wake word Detector parameters : snips-hotword

Key

Type

Default Value

Description

audio

option

["+@mqtt"]

list of audio servers to listen to, '+@mqtt' means all MQTT-bound audio-servers

hotword_id

option

default

identifier of the wakeword to use

model

option

/usr/share/snips/hotword

path to the wake word model folder

no_vad_inhibitor

option

false

Do not suspend hotword detector when no voice is detected

sensitivity

option

0.5

detector sensitivity (from 0 to 1, a higher value triggers more often)

vad_messages

flag

false

Send hermes messages on voice activation events

ASR parameters : snips-asr

Key

Type

Default Value

Description

acoustic_scale

option

assistant asr configuration

Acoustic scale, provided by <ASSISTANT_PATH>/custom_asr/config.json decoderConfig

beam_size

option

assistant asr configuration

beam size, provided by <ASSISTANT_PATH>/custom_asr/config.json decoderConfig

endpointing

option

assistant asr configuration

Endpointing rules parameters, provided by <ASSISTANT_PATH>/custom_asr/config.json endpointingRules

lattice_beam_size

option

assistant asr configuration

Lattice beam size, provided by <ASSISTANT_PATH>/custom_asr/config.json decoderConfig

max_active

option

assistant asr configuration

Max active, provided by <ASSISTANT_PATH>/custom_asr/config.json decoderConfig

min_active

option

assistant asr configuration

Min active, provided by <ASSISTANT_PATH>/custom_asr/config.json decoderConfig

model

option

/usr/share/snips/asr

path to the ASR model folder

no_fst_map

flag

true

disable fst mapping

no_snips_audio_server_replay

flag

false

Disable replay protocol (compatibility with third party audio-server)

no_warmup

flag

false

Deactivates the warmup run when loading the ASR model.

partial

flag

false

Send partial text captures

partial_period_ms

option

250

Period to send partial captures in milliseconds

thread_number

option

auto

Set the number of handler threads to handle asr requests. Default is equal to half of the number of cpu available.

use_final_probs

flag

assistant asr configuration

Use final probability, provided by <ASSISTANT_PATH>/custom_asr/config.json decoderConfig

NLU parameters : snips-nlu

Key

Type

Default Value

Description

model

option

default assistant nlu model path

Path to the nlu model

num_intent_alternatives

option

2

number of intent alternatives to generate.

num_slot_alternatives

option

2

number of slot alternatives to generate.

Dialog Manager parameters : snips-dialogue

Key

Type

Default Value

Description

default_site_id

option

default

Default site id

hotword_coalescing_duration

option

1

[EXPERIMENTAL] Duration (in seconds) during which subsequent hotwords on sites in the same group will be ignored

lambda_timeout

option

5

timeout between dialogue and lambda for endSession, in seconds

resources

option

/usr/share/snips/dialogue

path to the dialogue resources folder

retry_count

option

3

number of times, the dialogue tries to understand what the user is saying. If this count is reached, the dialogue manager will end the session and consider that the intent is not recognized.

session_timeout

option

15

internal timeout if one component doesn't answer, in seconds

site_group

option

[EXPERIMENTAL] List of site ids (comma separated) that should be in the same hotword coalescing group, pass the argument multiple times to create multiple groups

sites_in_same_group_default

flag

false

[EXPERIMENTAL] Change the default behaviour of hotword coalescing for sites not specified in site-group, putting them all in the same group (instead of a group per site)

sound_feedback_disabled_default

flag

false

Disable audio feedback by default

Skill Server parameters : snips-skill-server

Key

Type

Default Value

Description

skill_dir

option

unset

A directory that contains one skill to be started.

skill_roor_dir

option

/var/lib/snips/skills

A directory that contains multiple skills to be started.

Google ASR parameters : snips-asr-google

Key

Type

Default Value

Description

credentials

option

/usr/share/snips/googlecredentials.json

path to the Google ASR credentials

Configuration file format

The configuration file use the toml format.

Each component is defined by a section tag [<component-name>].

[snips-common] groups all the options common to all components.

Lines can be commented out using the symbol # at the beginning of each line.

A default configuration template is provided on linux when installing the snips platform.

e.g.

[snips-common]
# bus = "mqtt"
# mqtt = "localhost:1883"
# mqtt_username = ""
# mqtt_password = ""
# mqtt_tls_hostname = ""
# mqtt_tls_disable_root_store = false
# mqtt_tls_cafile = ""
# mqtt_tls_capath = ""
# mqtt_tls_client_cert = ""
# mqtt_tls_client_key = ""
# audio =["+@mqtt"]
# assistant = "/usr/share/snips/assistant"
# user_dir = "/var/lib/snips"
[snips-asr]
# no_fst_map = true
# beam_size = 8
# model = "/usr/share/snips/asr"
[snips-asr-google]
# credentials = "/usr/share/snips/googlecredentials.json"
[snips-audio-server]
# frame = 256
# bind = "default@mqtt"
# mike = "Built-in Microphone"
[snips-dialogue]
# resources = "/usr/share/snips/dialogue"
# session_timeout = 15
# lambda_timeout = 5
# retry_count = 3
# sound_feedback_enabled_default = true
[snips-hotword]
# model = "/usr/share/snips/hotword"
# hotword_id = "default"
# sensitivity = 0.5
[snipt-tts]