audeering / audtorch

Utils and data sets for audio and PyTorch
https://audeering.github.io/audtorch/
Other
83 stars 9 forks source link

Add ensure minimum length #63

Closed ATriantafyllopoulos closed 4 years ago

ATriantafyllopoulos commented 5 years ago

Summary

Adds EnsureMinimumLength to make sure that an input signal meets some minimum length requirements.

hagenw commented 4 years ago

As far as I see it, the following

audtorch.transforms.EnsureMinimumLength(length=1024, axis=-1)

is completely identical with

audtorch.transforms.Expand(size=1024, method='pad', axis=-1)

isn't it?

ATriantafyllopoulos commented 4 years ago

You are right! Thanks for noticing, I will close the PR.