# Simple speech enhancement example on Hugging Face website breaks

**URL:** <https://discuss.huggingface.co/t/simple-speech-enhancement-example-on-hugging-face-website-breaks/14181>\
**Category:** 🤗Transformers\
**Created:** [January 27, 2022, 9:26pm UTC](https://discuss.huggingface.co/t/simple-speech-enhancement-example-on-hugging-face-website-breaks/14181 "2022-01-27T21:26:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zwisch](https://avatars.discourse-cdn.com/v4/letter/z/8edcca/32.png) [@Zwisch](https://discuss.huggingface.co/u/Zwisch)\
**Post date:** [January 27, 2022, 9:26pm UTC](https://discuss.huggingface.co/t/simple-speech-enhancement-example-on-hugging-face-website-breaks/14181/1 "2022-01-27T21:26:29Z")

</div>

Hi, everyone. I’m trying to run the very first example from this page: [What is Audio-to-Audio? - Hugging Face](https://huggingface.co/tasks/audio-to-audio)

The code is very simple, just three lines:

```auto
from speechbrain.pretrained import SpectralMaskEnhancement
model = SpectralMaskEnhancement.from_hparams("speechbrain/mtl-mimic-voicebank")
model.enhance_file("sample_data/sp03_keyboard_sn0.wav")

```

Yet when I run it I get an error with the following stack trace:

```auto
TypeError Traceback (most recent call last)
<ipython-input-2-700e2dca0099> in <module>()
      1 from speechbrain.pretrained import SpectralMaskEnhancement
      2 model = SpectralMaskEnhancement.from_hparams("speechbrain/mtl-mimic-voicebank")
----> 3 model.enhance_file("sample_data/sp03_keyboard_sn0.wav")

/usr/local/lib/python3.7/dist-packages/speechbrain/pretrained/interfaces.py in enhance_file(self, filename, output_filename)
   2087 batch = noisy.unsqueeze(0)
   2088 if lengths_arg_exists(self.enhance_batch):
-> 2089 enhanced = self.enhance_batch(batch, lengths=torch.tensor([1.0]))
   2090 else:
   2091 enhanced = self.enhance_batch(batch)

/usr/local/lib/python3.7/dist-packages/speechbrain/pretrained/interfaces.py in enhance_batch(self, noisy, lengths)
   2063 # Perform masking-based enhancement, multiplying output with input.
   2064 if lengths is not None:
-> 2065 mask = self.mods.enhance_model(noisy_features, lengths=lengths)
   2066 else:
   2067 mask = self.mods.enhance_model(noisy_features)

/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
   1100 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
   1101 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1102 return forward_call(*input, **kwargs)
   1103 # Do not call functions when jit is used
   1104 full_backward_hooks, non_full_backward_hooks = [], []

TypeError: forward() got an unexpected keyword argument 'lengths'

```

Could anyone help me understand what is going wrong here? Thanks in advance.
