TimeShift<T>

Models & Types · AiDotNet.Augmentation.Audio

Shifts audio forward or backward in time.

Inheritance: AugmentationBase<T, Tensor<T>> → AudioAugmenterBase<T> → TimeShift<T>

For Beginners

Time shifting moves audio forward or backward, like adding silence at the beginning or end. This simulates different recording start times and helps models handle timing variations.

How It Works

Handling shifted samples:

  • Wrap: Samples that go off one end appear at the other (circular)
  • Zero: Shifted areas are filled with silence

Constructors

Constructor Summary
TimeShift(double minShiftFraction, double maxShiftFraction, double probability, int sampleRate) Creates a new time shift augmentation.

Properties

Property Summary
bool WrapAround { get; set; } Gets or sets whether to wrap shifted samples (true) or fill with zeros (false).
double MaxShiftFraction { get; } Gets the maximum shift as a fraction of total duration.
double MinShiftFraction { get; } Gets the minimum shift as a fraction of total duration.

Methods

Method Summary
IDictionary<string, object> GetParameters()