Should have a target duration parameter that can be specified either in seconds or in number of samples
If the input sound is longer than the target duration, pick a random offset (so we don't always output just the beginning of the audio) and crop the sound to the target duration
If the input sound is shorter than the target duration, pad the end of the sound (append digital silence) so the duration matches the target duration. Maybe it makes sense to support various padding modes here, just like in the Padding transform.
Should have a target duration parameter that can be specified either in seconds or in number of samples
If the input sound is longer than the target duration, pick a random offset (so we don't always output just the beginning of the audio) and crop the sound to the target duration
If the input sound is shorter than the target duration, pad the end of the sound (append digital silence) so the duration matches the target duration. Maybe it makes sense to support various padding modes here, just like in the
Padding
transform.