montreal_forced_aligner.helper.load_scp(path, data_type=<class 'str'>)[source]#

Load a Kaldi script file (.scp)

Scp files in Kaldi can either be one-to-one or one-to-many, with the first element separated by whitespace as the key and the remaining whitespace-delimited elements the values.

Returns a dictionary of key to value for one-to-one mapping case and a dictionary of key to list of values for one-to-many case.

See also

Kaldi scp details section

For more information on the SCP format

  • path (Path) – Path to Kaldi script file

  • data_type (type) – Type to coerce the data to


Dictionary where the keys are the first column and the values are all other columns in the scp file

Return type:

dict[str, Any]