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