def down_sample(x, sample_rate, k=2):
    """ Performs down sampling on the audio signal. It takes
        ever kth sample of the signal and returns the resulting
        audio signal and the resulting sample rate.

        :param x: the audio signal of shape N x C, where N
            is the number of samples, and C is the number of
            channels

        :param k: the number of every k samples to return

        :return: a tuple of sample rate and the audio signal
            down-sampled to include ever kth sample. """
    if len(x.shape[0]) < 2:
        return sample_rate / k, x[::k]
    return sample_rate / k, x[:, ::k]