espnet.transform.transformation.Transformation
Less than 1 minute
espnet.transform.transformation.Transformation
class espnet.transform.transformation.Transformation(conffile=None)
Bases: object
Apply some functions to the mini-batch
Examples
>>> kwargs = {"process": [{"type": "fbank",
... "n_mels": 80,
... "fs": 16000},
... {"type": "cmvn",
... "stats": "data/train/cmvn.ark",
... "norm_vars": True},
... {"type": "delta", "window": 2, "order": 2}]}
>>> transform = Transformation(kwargs)
>>> bs = 10
>>> xs = [np.random.randn(100, 80).astype(np.float32)
... for _ in range(bs)]
>>> xs = transform(xs)