xiph / rnnoise

Recurrent neural network for audio noise reduction
BSD 3-Clause "New" or "Revised" License
4.06k stars 896 forks source link

Training the model from scratch #12

Open delip opened 6 years ago

delip commented 6 years ago

I am looking at the training code. Is there a script to generate 'denoise_data9.h5' from the raw audio + noise examples?

Interstella12 commented 6 years ago

get some tips from issue #8

vi commented 6 years ago

I tried running the denoise_trailing, but the file output.f32 is empty, although I got matrix size: 50000000 x 87 after several hours.

vi commented 6 years ago

And I don't see any non-commented-out writes to fout FILE* in the source code.

Is it now stdout instead?

vi commented 6 years ago

Also I can't dump model:

$ python3 ../training/dump_rnn.py newweights9i.hdf5 rnn_data.c rnn_data.h
Using Theano backend.
Traceback (most recent call last):
  File "../training/dump_rnn.py", line 60, in <module>
    model = load_model(sys.argv[1], custom_objects={'msse': mean_squared_sqrt_error, 'mean_squared_sqrt_error': mean_squared_sqrt_error, 'my_crossentropy': mean_squared_sqrt_error, 'mycost': mean_squared_sqrt_error, 'WeightClip': foo})
  File "/usr/lib/python3/dist-packages/keras/models.py", line 279, in load_model
    model._make_train_function()
  File "/usr/lib/python3/dist-packages/keras/engine/training.py", line 990, in _make_train_function
    loss=self.total_loss)
  File "/usr/lib/python3/dist-packages/keras/legacy/interfaces.py", line 87, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/keras/optimizers.py", line 442, in get_updates
    new_p = p.constraint(new_p)
TypeError: 'int' object is not callable
kangyuanxun commented 6 years ago

I have the same problem when dump model. Traceback (most recent call last): File "e:\DNN\rnnoise\training\dump_rnn.py", line 85, in <module> model = load_model('newweights9i.hdf5', custom_objects={'msse': mean_squared_sqrt_error, 'mean_squared_sqrt_error': mean_squared_sqrt_error, 'my_crossentropy': mean_squared_sqrt_error, 'mycost': mean_squared_sqrt_error, 'WeightClip': foo}) File "C:\Users\kang\AppData\Local\Programs\Python\Python35\lib\site-packages\keras\models.py", line 309, in load_model model._make_train_function() File "C:\Users\kang\AppData\Local\Programs\Python\Python35\lib\site-packages\keras\engine\training.py", line 992, in _make_train_function loss=self.total_loss) File "C:\Users\kang\AppData\Local\Programs\Python\Python35\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper return func(*args, **kwargs) File "C:\Users\kang\AppData\Local\Programs\Python\Python35\lib\site-packages\keras\optimizers.py", line 481, in get_updates new_p = p.constraint(new_p) TypeError: 'int' object is not callable Have you solved the problem?

loretoparisi commented 6 years ago

@delip did you find any solution? It seems that training this model and trying to reproduce papers results it is hard.

delip commented 5 years ago

@loretoparisi unfortunately no. We ended up not using this in whatever we were doing, but I think it would be nice to develop this project further.

loretoparisi commented 5 years ago

@delip thank you. I was asking because someone at Mozilla DeepSpeech suggested me as pre-processing option to improve stt results. We have also tried but no way to make it working properly 👎

nerv3890 commented 5 years ago

I think the solutions of all the problems u guys just mentioned above is right here https://github.com/xiph/rnnoise/issues/8