espnet2.fileio.read_text.read_label
Less than 1 minute
espnet2.fileio.read_text.read_label
espnet2.fileio.read_text.read_label(path: Path | str) → Dict[str, List[List[str | float | int]]]
Read a text file indicating sequences of number
Examples
key1 start_time_1 end_time_1 phone_1 start_time_2 end_time_2 phone_2 ….
key2 start_time_1 end_time_1 phone_1
>>> d = load_num_sequence_text('label')
>>> np.testing.assert_array_equal(d["key1"], [0.1, 0.2, "啊"]))