espnet2.fileio.score_scp.XMLReader
Less than 1 minute
espnet2.fileio.score_scp.XMLReader
class espnet2.fileio.score_scp.XMLReader(fname: ~pathlib.Path | str, dtype: type = <class 'numpy.int16'>)
Bases: Mapping
Reader class for ‘xml.scp’.
Examples
key1 /some/path/a.xml key2 /some/path/b.xml key3 /some/path/c.xml key4 /some/path/d.xml …
>>> reader = XMLScpReader('xml.scp')
>>> tempo, note_list = reader['key1']
get_path(key)
keys() → a set-like object providing a view on D's keys