Configuration file
In this page, a complete description of the configuration file required by the VASR (VASR - C++) engine is provided.
This table explains what are the different field for, their range of possible values (if application) and their default value (if any).
Note that on Android the log/<name>/sink
and log/<name>/sink_options
are ignored
Field path | Optional | Value type | Range | Default value | Description |
---|---|---|---|---|---|
| ✔ | Object | N / A | Object that contains the different path required by the engine to load specific resources | |
| ✔ | String | N / A |
| Base location where the engine will load resources from. If relative, it will be based on the configuration file base path |
| ✔ | String |
| Directory where acoustic models ( | |
| ✔ | String |
| Directory where compiled grammars ( | |
| ✔ | String |
| Directory where log will be placed. If relative, it will be based on the | |
| ✔ | Object | N / A | Object that contains all the logging configuration of VASR | |
| ✔ | Object | N / A | Configuration for the logger | |
| ✔ | String | [ |
| Set the minimal log level for this logger. Note that setting this will print the level specified and everything above the level e.g. setting the level to |
| ✔ | String | [ |
| Set the destination of log messages for this logger |
| ✔ | Object | N / A | Contains all options specific to the type of sink | |
| ✔ | String | (For | ||
| ✔ | Int | [1'024 - inf] | (For | |
| ✔ | Int | [1 - inf] | (For | |
| ✔ | Boolean | false | (For | |
| ✘ | Object | N / A | Object that contains all the configuration of VASR | |
| ✘ | Object | N / A | List here all recognizer that will be created during run-time | |
| ✘ | Object | N / A | Specify the definition of a recognizer. The name is completely free and will be used in the code to create the Recognizer object | |
| ✘ | Array | N / A | A list of all the path to the acoustic model that will be loaded and used by this recognizer. If relative, it will be based on the | |
| ✔ | Object | N / A | Additional settings that will be passed to every acoustic model of this recognizer | |
| ✔ | Int | [100 - 10'000] | 500 | Amount of time (in milliseconds) that speech needs to be detected before triggering a recognition. Note that after a successful trigger the X ms of audio of this value will also be passed on to the recognizer. Needs to be a multiple a 100 |
| ✔ | Int | [100 - 10'000] | 700 | Amount of time (in milliseconds) that silence (non-speech) needs to be detected before triggering the end of the recognition. Needs to be a multiple a 100 |
| ✔ | Int | [0 - 1'000] | 450 | Amount of perfect silence (in milliseconds) that will be artificially added to the audio at its beginning and its end. This improve performance at almost no cost. Need to rarely be modified. |
| ✔ | Float | ]0.0 - 1.0[ | 0.5 | Set the sensibility of the VAD. Lower value mean more prone to false prositive and higher value to false negative |
| ✔ | Int | 0 or [450 - 10'000] | 750 | Amount of audio (in milliseconds) that needs to be send to the engine before it returns an intermediate result. A value of 0 completely disable intermediate result. Note that this value will only be an aproximation |
| ✘ | Object | N / A | List here all compiled grammars that will be loaded during run-time | |
| ✘ | Object | N / A | Specify the name of the model. The name is completely free and will be used in the code to load the appropriate grammar | |
| ✘ | String | Path to the compiled grammar file ( | ||
| ✔ | Object | N / A | Additional settings that will be passed to the model | |
| ✔ | Int | [1 - 10] | 3 | Set the number of hypothesis that will be returned by the engine for this model |
Example
{
"paths": {
"data_root": "../data",
"acmod": ".",
"graph": "."
},
"log": {
"vasr": {
"level": "off"
},
"perf": {
"level": "info",
"sink": "stdout"
},
"recognizer:rec": {
"sink": "stderr-color"
},
"model:cmd": {
"sink": "file",
"sink_options": {
"path": "cmd.log",
"max_size": 10240,
"max_file": 5
}
}
},
"asr": {
"recognizers": {
"rec": {
"acmods": [
"eng-US.vam"
],
"settings": {
"min_speech_duration": 500,
"min_silence_duration": 700,
"padding_size": 450,
"speech_probability_threshold": 0.5,
"intermediate_result_frequency": 0
}
}
},
"models": {
"cmd": {
"file": "eng-US.vgg",
"settings": {
"max_hypothesis": 5
}
}
}
}
}