In this article we will explain the effect of aliasing, why it occurs and what can be done against it. Aliasing can occur whenever a sample rate conversion or sampling of an analog signal is performed. Great care needs to be taken to inhibit aliasing, as otherwise the resulting signal can be severely degraded.
To motivate this, let us listen to the effect of aliasing for three different kinds of signals. We take an original audio signal and perform a downsampling operation, for example to save bandwidth. Naturally, higher frequencies in the signal cannot be represented accurately with a too low sampling rate, so the downsampled audio does not sound as "bright" as the original. Despite, the effect of aliasing even impedes the audio quality. For each signal, first the original signal is presented, followed by a downsampled version that contains aliasing. Finally, the downsampled audio that has been sent through an anti-aliasing filter to prevent aliasing is provided.
A speech signal (taken from LibriVox). Here, aliasing manifests itself as some extra noise, especially around characters like 's' and 'z'.
# to call this function, the code below needs to be executed before presentAliasingAudio(data_voice, rate_voice, 6)