class AdaptiveAudioNormalizationNew(Module):
  __parameters__ = []
  __buffers__ = ["filter_", ]
  filter_ : Tensor
  training : bool
  _is_full_backward_hook : Optional[bool]
  to_pad : int
  def forward(self: __torch__.models.stt_model_blocks.AdaptiveAudioNormalizationNew,
    spect: Tensor) -> Tensor:
    _0 = __torch__.models.stt_model_blocks.simple_pad
    spect0 = torch.log1p(torch.mul(spect, 1048576))
    _1 = torch.eq(torch.len(torch.size(spect0)), 2)
    if _1:
      _2 = torch.slice(torch.unsqueeze(spect0, 0), 1)
      spect1 = torch.slice(_2, 2)
    else:
      spect1 = spect0
    mean = torch.mean(spect1, [1], True)
    to_pad = self.to_pad
    mean0 = _0(mean, to_pad, )
    filter_ = self.filter_
    mean1 = torch.conv1d(mean0, filter_)
    mean_mean = torch.mean(mean1, [-1], True)
    spect2 = torch.add(spect1, torch.neg(mean_mean))
    return spect2
def simple_pad(x: Tensor,
    pad: int) -> Tensor:
  _3 = torch.slice(torch.slice(torch.slice(x), 1), 2, 1, torch.add(1, pad))
  left_pad = torch.flip(_3, [-1])
  _4 = torch.slice(torch.slice(torch.slice(x), 1), 2, torch.sub(-1, pad), -1)
  right_pad = torch.flip(_4, [-1])
  _5 = torch.cat([left_pad, x, right_pad], 2)
  return _5
