Esempio n. 1
0
def SpectrogramTransformer(mel=True, to_db=True):
    """Creates a factory for creating AudioToSpec
    transforms with different parameters"""
    sg_type = {"mel": mel, "to_db": to_db}
    transforms = _get_transform_list(sg_type)
    pipe_noargs = partial(fill_pipeline,
                          sg_type=sg_type,
                          transform_list=transforms)
    pipe_noargs.__signature__ = _get_signature(transforms)
    return pipe_noargs
Esempio n. 2
0
 def __init__(self, cache_folder=None, **kwargs):
     item_tfms = audio_item_tfms(**kwargs)
     type_tfm = partial(AudioTensor.create, cache_folder=cache_folder)
     return super().__init__(type_tfms=type_tfm,
                             item_tfms=item_tfms,
                             batch_tfms=IntToFloatTensor)
Esempio n. 3
0
 def __init__(self, width=9):
     self.td = partial(_torchdelta, width=width)