espnet3.systems.base.inference.infer
espnet3.systems.base.inference.infer
espnet3.systems.base.inference.infer(config: DictConfig)
Run inference over all configured test sets and write SCP files.
This entrypoint expects each inference result to be a dict containing a sample identifier under utt_id (or the configured idx_key), plus one value per output field. The final SCP files are always written under.
${inference_dir}/<test_name>/<field>.scpEach SCP line.
<utt_id> <value_or_path>Primitive values are written directly into SCP files. When espnet3.systems.base.inference_runner.InferenceRunner is used, workers first write shard-local files under:
${inference_dir}/<test_name>/split.<rank>/Example return value from ``output_fn`` or directly from the inference model.
{"utt_id": "utt1", "hyp": "hello world"}Generated SCP.
inference_dir/test-clean/hyp.scp
utt1 hello worldNon-scalar values are serialized per shard, for example:
${inference_dir}/<test_name>/split.<rank>/<field>/<utt_id>.*and the final merged <field>.scp written under ${inference_dir}/<test_name>/ points at those shard-local paths.
Example WAV configuration.
output_artifacts:
audio:
type: wav
sample_rate: 16000Example return value from ``output_fn``.
{"utt_id": "utt1", "audio": waveform_numpy}Top-level list / tuple outputs are not supported. Each output field must be a single value. If you need structured content, return a dict and let it be serialized as JSON.
- Parameters:config – Hydra/OmegaConf configuration containing the dataset, inference directory, provider/runner definitions, and optional
output_artifactswriter settings.
