espnet2.fileio.read_text.read_2columns_text
Less than 1 minute
espnet2.fileio.read_text.read_2columns_text
espnet2.fileio.read_text.read_2columns_text(path: Path | str) → Dict[str, str]
Read a text file having 2 columns as dict object.
Examples
wav.scp: : key1 /some/path/a.wav key2 /some/path/b.wav
>>> read_2columns_text('wav.scp')
{'key1': '/some/path/a.wav', 'key2': '/some/path/b.wav'}