Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoding the model #8

Open
liuanping opened this issue Oct 11, 2017 · 50 comments
Open

Decoding the model #8

liuanping opened this issue Oct 11, 2017 · 50 comments

Comments

@liuanping
Copy link

When I try to use the provided python script dump_rnn.py to decode the newweights9i.hdf5 model, I found that it can not work well. So I change a lot of it to make it work well. I am not sure if it is right in my way. Here I want share them to you. If you are not busy in some time, please help me check it. I have try it to decode the model i got. I add below in the begging.

from keras.constraints import Constraint
def mean_squared_sqrt_error(y_true, y_pred):
return K.mean(K.square(K.sqrt(y_pred) - K.sqrt(y_true)), axis=-1)

def my_crossentropy(y_true, y_pred):
return K.mean(2*K.abs(y_true-0.5) * K.binary_crossentropy(y_pred, y_true), axis=-1)

def mymask(y_true):
return K.minimum(y_true+1., 1.)

def msse(y_true, y_pred):
return K.mean(mymask(y_true) * K.square(K.sqrt(y_pred) - K.sqrt(y_true)), axis=-1)

def mycost(y_true, y_pred):
return K.mean(mymask(y_true) * (10K.square(K.square(K.sqrt(y_pred) - K.sqrt(y_true))) + K.square(K.sqrt(y_pred) - K.sqrt(y_true)) + 0.01K.binary_crossentropy(y_pred, y_true)), axis=-1)

def my_accuracy(y_true, y_pred):
return K.mean(2*K.abs(y_true-0.5) * K.equal(y_true, K.round(y_pred)), axis=-1)

class WeightClip(Constraint):
def init(self, c=2,name='WeightClip'):
self.c = c

    def __call__(self, p):
	#return {'name': self.__class__.__name__, 'c': self.c}
            return K.clip(p, -self.c, self.c)

    def get_config(self):
            return {'name': self.__class__.__name__, 'c': self.c}

add an argument to name = 'WeightClip' init

and change load_model from
model = load_model('./newweights9i.h5', 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})

to
model = load_model(sys.argv[1], custom_objects={'msse':msse, 'mean_squared_sqrt_error': mean_squared_sqrt_error, 'my_crossentropy':my_crossentropy, 'mycost':mycost, 'WeightClip':WeightClip})

@zhaoforever
Copy link

Hi! Thanks for the sharing. I am also learning about the project and when I try to get the denoise_data9.h5 using the bin2hdf5.py, something wrong happens. Would you please show me the way to use the bin2hdf5.py? Thanks.

@liuanping
Copy link
Author

@zhaoforever you can use the main function in denoise.c to get the feature for tranning.

@jmvalin
Copy link
Member

jmvalin commented Oct 18, 2017

@liuanping so you've been able to train a model with my code -- cool! As for loading it, I've had all kinds of problems getting Keras to do that. I'll try the change you suggested (once I'm done with the ICASSP paper).

@liuanping
Copy link
Author

@jmvalin i have trained a model to try do ASR in noisy, and the result is not so good. I think is because of the bandwidth in the high frequency band is little big. So i also try to use a 40 band feature to train a new model and have a try and i constrain the frequency from 0Hz-8KHz, because the frequency sample is 16KHz. I hope it would be better.

@zhaoforever
Copy link

@liuanping I think 16KHz sampling rate will be enough for both ASR task and communication.

@liuanping
Copy link
Author

@zhaoforever I found that the speech information have been hurt in the high frequency band, this may damage the ASR because the machine can hear the high frequency information. So i want to save the high frequency information by using much more band like 40 instead 22

@zhaoforever
Copy link

zhaoforever commented Oct 20, 2017

@liuanping As @jmvalin mentioned, this project mainly targets speech communication instead of speech recognition. So the algorithm architecture is based on some speech codec algorithm. I don't think the RNNoise will work well for ASR task without changing the sampling rate and band feathure. I think you are on the right way and looking forward to your results.

@mbebenita
Copy link

Besides , would you please share you email so we can have a deeper discussion.

Please keep the discussion public (if possible) so we can all benefit, thanks.

@airupthere123
Copy link

airupthere123 commented Nov 8, 2017

@liuanping Thanks for your Keras code and it works. But as you said, you change the band feature to 40 bands instead of 22. As I know, the features from the C code contains some algorithm from the opus, which means you have to make a lot of changes. Have you finish the test yet?

@liuanping
Copy link
Author

@yeah i have done it ,but it can not make better for ASR, some people advise me to train together with DNN or BLSTM at the same time. Also, i think this may heart voice. No i think it could use to combine with beamfoming tech.

@Gram2017
Copy link

Gram2017 commented Nov 25, 2017

First of all, thanks for publishing the RNNoise code...

I prepared speech_only.wav, noise_only.wav, speech_noise.wav.
and then run

~/rnnoise$ git clone https://github.com/smallmuou/wavutils
~/rnnoise/wav$ ../wavutils/bin/wavinfo speech_only.wav
++++++++++++++++++++++++++++++++++++++++++++++

  •      WAVEFORM INFORMATION              +
    

++++++++++++++++++++++++++++++++++++++++++++++
Audio Format: 1 (0x0001)
Num Channels: 1 (0x0001)
Sample Rate: 48000 (0x0000bb80)
Bits Per Sample: 16 (0x0010)
PCM Size: 3564480 (0x003663c0)

and then,

step 1)
~/rnnoise/wavutils/bin/wav2pcm speech_only.wav speech_only.pcm
~/rnnoise/wavutils/bin/wav2pcm noise_only.wav noise_only.pcm
~/rnnoise/wavutils/bin/wav2pcm speech_noise.wav speech_noise.pcm

step 2) ~/rnnoise/src/denoise_training speech_only.pcm noise_only.pcm output.f32
-> I got "matrix size: 500000 x 87" message.

step 3) ~/rnnoise/training/bin2hdf5.py output.f32 500000 87 denoise_data9.h5

step 4) ~/rnnoise/training/rnn_train.py
-> denoise_data9.h5 -> newweights9i.hdf5

step 5) ~/rnnoise/training/dump_rnn.py newweights9i.hdf5 rnn_data.c rnn_data.h
dump_rnn.py.txt

step 6) make clean & make

step 7) ~/rnnoise/examples/rnnoise_demo speech_noise.pcm denoised_speech_noise.pcm

step 8) ~/rnnoise/wavutils/bin/pcm2wav 1 48000 16 denoised_speech_noise.pcm denoised_speech_noise.wav
-> Successfully convert denoised_speech_noise.pcm to denoised_speech_noise.wav.

Good Luck ~~

From Jin

@zhaoforever
Copy link

@Gram2017 Thanks for your experience about using the RNNoise. As you mentioned, the size of the speech_only.wav is 3564480,which seems to be a big data file. Does the file come from some public database? Thanks.

@18307612949
Copy link

step 2) ~/rnnoise/src/denoise_training speech_only.pcm noise_only.pcm output.f32
-> I got "matrix size: 500000 x 87" message. ------------where is ''/rnnoise/src/denoise_training ''

@Interstella12
Copy link

Interstella12 commented Jan 22, 2018

@18307612949 ,generated by running './compile.sh' in the terminal at /src

@sailor88128
Copy link

@liuanping Hey, guy. How is your way to optimize this method for ASR? what improvement is useful to match ASR.

@delip
Copy link

delip commented Jan 31, 2018

@Gram2017/everyone

The recipe in this comment shows how to generate the data file for a single wave file. Say I have a bunch of speech_only and noise_only PCM files. How do I prep the data for the trainer?

@sailor88128
Copy link

@delip normalize, resample and combine them as one PCM file.

@kris-mlguy
Copy link

kris-mlguy commented May 23, 2018

@Gram2017 Thanks for the description in detail. When I try to execute step 2, it's continuously running with terminal output as shown in screenshot attached. Do you have any suggestion to solve it ?

screenshot_rnnoise

@zhly0
Copy link

zhly0 commented May 25, 2018

Hi,guys,learned many things from your discussion,wandering when I use a 16k hz training samples,do I need to change the code or not need to change the code?

@venkat-kittu
Copy link

I am also getting same error
screenshot_from_2018-05-28_18-40-12

@kris-mlguy
Copy link

The 'count' variable is set to a very high value in denoise.c and that's the reason for high execution time. Reducing the count value will help you see the output.

@jmvalin
Copy link
Member

jmvalin commented May 28, 2018

The output is meant to be redirected to a file and saved. The count variable just determines how many training samples are generated

@venkat-kittu
Copy link

venkat-kittu commented May 29, 2018

I am getting below error while running "python dump_rnn.py newweights9i.hdf5 rnn_data.c rnn_data.h"

File "training/dump_rnn.py", line 88, in
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/local/lib/python2.7/dist-packages/keras/models.py", line 282, in load_model
model._make_train_function()
File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 990, in _make_train_function
loss=self.total_loss)
File "/usr/local/lib/python2.7/dist-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keras/optimizers.py", line 481, in get_updates
new_p = p.constraint(new_p)
TypeError: 'int' object is not callable

I have also tried the code posted by @liuanping but again i am getting below error

File "training/dump_rnn.py", line 95, in
model = load_model(sys.argv[1], custom_objects={'msse':msse, 'mean_squared_sqrt_error': mean_squared_sqrt_error, 'my_crossentropy':my_crossentropy, 'mycost':mycost, 'WeightClip':WeightClip})
File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 243, in load_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 317, in model_from_config
return layer_module.deserialize(config, custom_objects=custom_objects)
File "/usr/local/lib/python2.7/dist-packages/keras/layers/init.py", line 55, in deserialize
printable_module_name='layer')
File "/usr/local/lib/python2.7/dist-packages/keras/utils/generic_utils.py", line 144, in deserialize_keras_object
list(custom_objects.items())))
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 2514, in from_config
process_layer(layer_data)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 2500, in process_layer
custom_objects=custom_objects)
File "/usr/local/lib/python2.7/dist-packages/keras/layers/init.py", line 55, in deserialize
printable_module_name='layer')
File "/usr/local/lib/python2.7/dist-packages/keras/utils/generic_utils.py", line 146, in deserialize_keras_object
return cls.from_config(config['config'])
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 1271, in from_config
return cls(**config)
File "/usr/local/lib/python2.7/dist-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keras/layers/core.py", line 829, in init
self.kernel_constraint = constraints.get(kernel_constraint)
File "/usr/local/lib/python2.7/dist-packages/keras/constraints.py", line 177, in get
return deserialize(identifier)
File "/usr/local/lib/python2.7/dist-packages/keras/constraints.py", line 170, in deserialize
printable_module_name='constraint')
File "/usr/local/lib/python2.7/dist-packages/keras/utils/generic_utils.py", line 153, in deserialize_keras_object
return cls(**config['config'])
TypeError: object() takes no parameters

@venkat-kittu
Copy link

i have solved that error by just replacing init with init in @liuanping
thank you for the code

@kris-mlguy
Copy link

@venkat-kittu Replacing init with init ?

@venkat-kittu
Copy link

@KrishnanParameswaran i replaced the init with init in following [image]
screenshot 5

@dariofranceschinipev
Copy link

Tried to followboth @liuanping and @venkat-kittu suggestions, but I still have the following result:
Can you please help me?

dfranceschini@PV-NB-DF03:TRAIN_10mins$ ../github/training/dump_rnn.py newweights9i.hdf5 rnn_data.c rnn_data.h
Using TensorFlow backend.
Traceback (most recent call last):
  File "../github/training/dump_rnn.py", line 86, in <module>
    model = load_model(sys.argv[1], custom_objects={'msse':msse, 'mean_squared_sqrt_error': mean_squared_sqrt_error, 'my_crossentropy':my_crossentropy, 'mycost':mycost, 'WeightClip':WeightClip})
  File "/home/dfranceschini/.local/lib/python2.7/site-packages/keras/models.py", line 270, in load_model
    model = model_from_config(model_config, custom_objects=custom_objects)
  File "/home/dfranceschini/.local/lib/python2.7/site-packages/keras/models.py", line 347, in model_from_config
    return layer_module.deserialize(config, custom_objects=custom_objects)
  File "/home/dfranceschini/.local/lib/python2.7/site-packages/keras/layers/__init__.py", line 55, in deserialize
    printable_module_name='layer')
  File "/home/dfranceschini/.local/lib/python2.7/site-packages/keras/utils/generic_utils.py", line 144, in deserialize_keras_object
    list(custom_objects.items())))
  File "/home/dfranceschini/.local/lib/python2.7/site-packages/keras/engine/topology.py", line 2525, in from_config
    process_layer(layer_data)
  File "/home/dfranceschini/.local/lib/python2.7/site-packages/keras/engine/topology.py", line 2511, in process_layer
    custom_objects=custom_objects)
  File "/home/dfranceschini/.local/lib/python2.7/site-packages/keras/layers/__init__.py", line 55, in deserialize
    printable_module_name='layer')
  File "/home/dfranceschini/.local/lib/python2.7/site-packages/keras/utils/generic_utils.py", line 146, in deserialize_keras_object
    return cls.from_config(config['config'])
  File "/home/dfranceschini/.local/lib/python2.7/site-packages/keras/engine/topology.py", line 1271, in from_config
    return cls(**config)
  File "/home/dfranceschini/.local/lib/python2.7/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "/home/dfranceschini/.local/lib/python2.7/site-packages/keras/layers/core.py", line 851, in __init__
    self.kernel_constraint = constraints.get(kernel_constraint)
  File "/home/dfranceschini/.local/lib/python2.7/site-packages/keras/constraints.py", line 177, in get
    return deserialize(identifier)
  File "/home/dfranceschini/.local/lib/python2.7/site-packages/keras/constraints.py", line 170, in deserialize
    printable_module_name='constraint')
  File "/home/dfranceschini/.local/lib/python2.7/site-packages/keras/utils/generic_utils.py", line 153, in deserialize_keras_object
    return cls(**config['config'])
TypeError: object() takes no parameters

@akshayaCap
Copy link

akshayaCap commented Jun 11, 2018

Has anyone fixed the below error in step 2? If so how? I tried reducing the count but that did not work. Thank you.
Update: It is producing an array of size zero.

err1

@amadupu
Copy link

amadupu commented Jul 4, 2018

i would like to summarize few fixes that might need to be done for some of the issues highlighted in this forum

  1. for correcting junk characters on console output perform the following

Step-1: Edit rnnoise/src/denoise.c line 653 for the following
#if 1
fwrite(features, sizeof(float), NB_FEATURES, fout); // instead stdout
fwrite(g, sizeof(float), NB_BANDS, fout);
fwrite(Ln, sizeof(float), NB_BANDS, fout);
fwrite(&vad, sizeof(float), 1, fout);

NOTE: u may optionally reduce the count to lesser value from 50000000. i used 50000 for quick validation purposes. i guess 500000 samples should be good enough. please correct me if not

Step-2: run './compile.sh'

  1. TypeError: 'int' object is not callable

Follow the first comment by @liuanping in this discussion thread
However, some minor corrections as follows (related to syntax corrections and indentation)
NOTE: these are thrown as run time exceptions. so you will easily find out if missed.

Correction 1: missing multipler for 10K.square and 0.01K.binar_crossentrop in mycost method
def mycost(y_true, y_pred):
return K.mean(mymask(y_true) * (10 * K.square(K.square(K.sqrt(y_pred) - K.sqrt(y_true))) + K.square(K.sqrt(y_pred) - K.sqrt(y_true)) + 0.01 * K.binary_crossentropy(y_pred, y_true)), axis=-1)

Corretion 2: Invalid class initializer 'init'

class WeightClip(Constraint):
def init(self, c=2,name='WeightClip'):
self.c = c

Correction 3: Indentation issues if any

@venkat-kittu
Copy link

Should i have to change code if I train data with different sampling rate like 44100hz or 16khz.

@loretoparisi
Copy link

@Gram2017 thank you for your detailed example. It is not clear to me how train multiple file samples I mean supposed I have several noise, speech and noise+speech clips shall I concat them in a single file?

@zozyaa
Copy link

zozyaa commented Dec 7, 2018

Has anyone fixed the below error in step 2? If so how? I tried reducing the count but that did not work. Thank you.
Update: It is producing an array of size zero.

`` :~/rnnoise/src$ ./denoise_training speech_only.pcm babble.pcm count > output_S_b_0dB.f32
Segmentation fault

@akshayaCap Hey, I met the same error. It generates an array of size zero. Have you fixed it?

Plus it says I have a segmentation fault. But I didnt find an overflow from denoise.c
I already fixed the stdout and init errors as @venkat-kittu said.
How should I generate my own data from the above steps?

Thanks a lot.

@nerv3890
Copy link

nerv3890 commented Dec 19, 2018

I am also getting same error
screenshot_from_2018-05-28_18-40-12

Hi venkat-kittu
Did you solve this problem?

I got the same error in step just like ur picture
The garbled it shows is not a big problem
The problem is the the output (output.f32) of denoise_training is empty
Do anyone know how to solve this problem?

@kris-mlguy
Copy link

@zhly0 @venkat-kittu As far as I understand, the application for feature extraction doesn't know whether you're processing a 48kHz file or a 16kHz file. The number of samples you feed in per frame must be based on the sampling rate of the input file. So play around with frame size to suit the sampling frequency of your audio files.

@nerv3890
Copy link

nerv3890 commented Dec 20, 2018

@zhly0 @venkat-kittu As far as I understand, the application for feature extraction doesn't know whether you're processing a 48kHz file or a 16kHz file. The number of samples you feed in per frame must be based on the sampling rate of the input file. So play around with frame size to suit the sampling frequency of your audio files.

2018-12-20 4 08 00

Firstly, thank for your answer, but I still have the questions. I want to train the model using my own dataset. I have two 30s wav files which are HumanVoice_only.wav and Noise_only.wav. Their format is like above picture, the sample rate is 48kHz. Firstly I transform these two wav files into pcm files follow the steps which @Gram2017 just mentioned above. And then I use denoise_train (I modify the variable count from a high value to 5 in denoise.c in order to test the program quickly). But the program still generate the output file which is empty (I use vim to read the output file). The output array is zero. Anyone knows how to fix this problem? I appreciate.

@venkat-kittu
Copy link

venkat-kittu commented Dec 20, 2018

@nerv3890 have you changed stdout in lines 653,654,655,656 in denoise.c to fout.
if not try changing it and run ./compile.sh in that folder next run denoise_train as mentioned

@nerv3890
Copy link

@nerv3890 have you changed stdout in lines 653,654,655,656 in denoise.c to fout.
if not try changing it and run ./compile.sh in that folder next run denoise_train as mentioned

Sorry it seems like a simple question. I am not familiar with C.
YES your advice works. Thanks for ur answer and I really appreciate.

@jon2718
Copy link

jon2718 commented Apr 28, 2019

Hi,

I'm still unclear whether it is possible to obtain the original training data: denoise_data9.h5?

Thanks.

Jon

@ilor2
Copy link

ilor2 commented Jun 19, 2019

@delip normalize, resample and combine them as one PCM file.

is it necessary to normalize? can't we just combine them?

Thanks

@ucasiggcas
Copy link

@18307612949 ,generated by running './compile.sh' in the terminal at /src

Dear,
I have the same problem,
First ,where should I put the dataset ?
all_noise_data and all_speech_data
Thanks

@ucasiggcas
Copy link

ucasiggcas commented Jul 12, 2019

First of all, thanks for publishing the RNNoise code...

I prepared speech_only.wav, noise_only.wav, speech_noise.wav.
and then run

~/rnnoise$ git clone https://github.com/smallmuou/wavutils
~/rnnoise/wav$ ../wavutils/bin/wavinfo speech_only.wav
++++++++++++++++++++++++++++++++++++++++++++++

  •      WAVEFORM INFORMATION              +
    

++++++++++++++++++++++++++++++++++++++++++++++
Audio Format: 1 (0x0001)
Num Channels: 1 (0x0001)
Sample Rate: 48000 (0x0000bb80)
Bits Per Sample: 16 (0x0010)
PCM Size: 3564480 (0x003663c0)

and then,

step 1)
~/rnnoise/wavutils/bin/wav2pcm speech_only.wav speech_only.pcm
~/rnnoise/wavutils/bin/wav2pcm noise_only.wav noise_only.pcm
~/rnnoise/wavutils/bin/wav2pcm speech_noise.wav speech_noise.pcm

step 2) ~/rnnoise/src/denoise_training speech_only.pcm noise_only.pcm output.f32
-> I got "matrix size: 500000 x 87" message.

step 3) ~/rnnoise/training/bin2hdf5.py output.f32 500000 87 denoise_data9.h5

step 4) ~/rnnoise/training/rnn_train.py
-> denoise_data9.h5 -> newweights9i.hdf5

step 5) ~/rnnoise/training/dump_rnn.py newweights9i.hdf5 rnn_data.c rnn_data.h
dump_rnn.py.txt

step 6) make clean & make

step 7) ~/rnnoise/examples/rnnoise_demo speech_noise.pcm denoised_speech_noise.pcm

step 8) ~/rnnoise/wavutils/bin/pcm2wav 1 48000 16 denoised_speech_noise.pcm denoised_speech_noise.wav
-> Successfully convert denoised_speech_noise.pcm to denoised_speech_noise.wav.

Good Luck ~~

From Jin

Dear,
I have the problem that how to prepare the dataset,
Could you please help me ?
I have the noise file /all_noise and speech file /all_speech
and then what should I do to concatenate one wav file ?
If I have the all_noise.wav and all_speech.wav , how to concatenate the speech_noise.wav ?
How to set the SNR or amplitude ?
Thx

@ucasiggcas
Copy link

@jmvalin i have trained a model to try do ASR in noisy, and the result is not so good. I think is because of the bandwidth in the high frequency band is little big. So i also try to use a 40 band feature to train a new model and have a try and i constrain the frequency from 0Hz-8KHz, because the frequency sample is 16KHz. I hope it would be better.

Dear,
Now I have the same question,
if I want use the sample rate of 16k data for training ,what parameters should I change/modify ?
Who have the same question ?
Could U please have a talk ?

Thx

@ucasiggcas
Copy link

Should i have to change code if I train data with different sampling rate like 44100hz or 16khz.

Dear
Have you got the best results ?
What parameters did you change ?
Could U please me ?

@ucasiggcas
Copy link

ANy one has the dump_rnn.py question ?
It's a big bug !!!
#85

@pranshurastogi29
Copy link

hey i was trying to replicate some results as soon as run compile.sh i got this in return
denoise.c: In function ‘main’:
denoise.c:541:5: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(tmp, sizeof(short), FRAME_SIZE, f2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
denoise.c:573:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(tmp, sizeof(short), FRAME_SIZE, f1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
denoise.c:576:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(tmp, sizeof(short), FRAME_SIZE, f1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
denoise.c:585:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(tmp, sizeof(short), FRAME_SIZE, f2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
denoise.c:588:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(tmp, sizeof(short), FRAME_SIZE, f2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
can you explane it to me

@pranshurastogi29
Copy link

@nerv3890 have you changed stdout in lines 653,654,655,656 in denoise.c to fout.
if not try changing it and run ./compile.sh in that folder next run denoise_train as mentioned

hey i am also having empty outputfile and when i saw this comment i go to denoise.c and tried to change it but could not able to is because their are just 642 lines in all can you give me a snapshot

@yingfenging
Copy link

@liuanping As @jmvalin mentioned, this project mainly targets speech communication instead of speech recognition. So the algorithm architecture is based on some speech codec algorithm. I don't think the RNNoise will work well for ASR task without changing the sampling rate and band feathure. I think you are on the right way and looking forward to your results.

Hi,@jmvalin mentioned, this project mainly targets speech communication instead of speech recognition. I'd like to know which paper this sentence comes from? thank you @zhaoforever

@zhangyutf
Copy link

hey i was trying to replicate some results as soon as run compile.sh i got this in return
denoise.c: In function ‘main’:
denoise.c:541:5: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(tmp, sizeof(short), FRAME_SIZE, f2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
denoise.c:573:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(tmp, sizeof(short), FRAME_SIZE, f1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
denoise.c:576:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(tmp, sizeof(short), FRAME_SIZE, f1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
denoise.c:585:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(tmp, sizeof(short), FRAME_SIZE, f2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
denoise.c:588:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(tmp, sizeof(short), FRAME_SIZE, f2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
can you explane it to me

Hi,@pranshurastogi29, have you solved this problem? I have the same problem...

@fmbao
Copy link

fmbao commented Oct 15, 2021

why ? I always generate matrix size: 0 x 87

@dyustc
Copy link

dyustc commented Jul 19, 2022

why ? I always generate matrix size: 0 x 87

I get the same issue as you. Have you solved this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests