ESPnet3 Config Resolvers
ESPnet3 Config Resolvers
ESPnet3 registers a small set of OmegaConf resolvers to pull external data into YAML configs at load time. These are defined in espnet3.utils.config_utils and are available in all stage configs.
Important
Resolvers are resolved when the config is loaded. They are part of the config authoring model, not an extra runtime CLI layer.
✅ At a glance
| Resolver | Description |
|---|---|
load_line | Load lines from a text file into a list. |
load_yaml | Load a YAML file or a specific key from it. |
load_line
Use load_line to read a text file (one entry per line) and inject it into a config. This is commonly used for ASR or speech-to-text token lists, which are often easier to manage in a separate text file than inline YAML.
Sample file:
<blank>
<sos/eos>
<unk>token_list: ${load_line:conf/token_list.txt}When the config is loaded, token_list becomes:
token_list:
- "<blank>"
- "<sos/eos>"
- "<unk>"load_yaml
Use load_yaml to load an entire YAML file or a single value from it.
Sample file (conf/training.yaml):
exp_tag: asr_template_train
exp_dir: ${recipe_dir}/exp/${exp_tag}exp_tag: ${load_yaml:conf/training.yaml,exp_tag}
full_cfg: ${load_yaml:conf/training.yaml}When the config is loaded, the values are resolved from the referenced file.
Example of the resolved result in a second config:
exp_tag: asr_template_train
full_cfg:
exp_tag: asr_template_train
exp_dir: ${recipe_dir}/exp/${exp_tag}When a key is provided, it uses dot notation and raises an error if the key is missing.
Warning
Use resolvers for shared config values and small external inputs. Do not turn them into a hidden replacement for normal recipe structure.
