drethage / speech-denoising-wavenet

A neural network for end-to-end speech denoising
MIT License
673 stars 165 forks source link

Some samples of the denoised speech wave is missing in the end of the speech #2

Closed wyn314 closed 7 years ago

wyn314 commented 7 years ago

Hi, I used this code and the finetuned model directly. But I encountered a problem. The output enhanced wave file is not as long as the original noisy wave. Some samples seemed to be missing in the end of the input noisy wave. I can't figure out what is the reason. Thanks very much.

drethage commented 7 years ago

The output waveform is always (receptive_field_length - 1) samples shorter than the input, 6138 samples for the pretrained model. This is to ensure that every output sample has a full context worth of samples feeding into its prediction (as opposed to artificially padding the input of the first and last 3069 samples).

If you explicitly require the output to be equal in length to the input, you can pad it yourself.