import torch


def pre_emphasise_torch(signal, preemph: float = 0.97):
  """
  Pre-emphasis on the input signal
  :param signal: (time,)
  :param preemph:
  :return: (time,)
  """
  return torch.cat((signal[0:1], signal[1:] - preemph * signal[:-1]))