-
Notifications
You must be signed in to change notification settings - Fork 256
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
Add simple AGC #213
base: main
Are you sure you want to change the base?
Add simple AGC #213
Conversation
@StuartIanNaylor can you try it out and give some feedback? |
Will do, I will edit this with results |
Apols Hendrik but my lack of knowledge but from the feat_agc branch I get from
|
Oh yeah you need to add \`--feature=agc\`
|
The plugin runs is there now a control level for the AGC as struggling to notice much difference Also noticed it nows logs just :Warn which is great |
Yes, you can do so also by using a profile for that:
Yes see 59b64d4. |
Yeah --profile=release-lto solves that and also the level seems to be amplitude not RMS which is also great as RMS is harder to visualise. I wish I could help with the coding but as you have found out compiling is a struggle even though with your help I am now much more conversant with cargo, which is great. I spent a little time spamming https://github.com/Rikorose/DeepFilterNet/ as maybe more interested parties might get involved and help with some of the heavy lifting of splitting the ERB/DF decoder as that really would be the icing on the cake. Its a thing of beauty Hendrik you have created and even though I haven't tried is DeepFilterNet2 still a work in progress? |
This model was released earlier this year and is integrated into this framework. |
@Rikorose Hendrik there is a problem somewhere with the AGC. If you have high noise say play some music on speaker close by then with no AGC the filter works fine, but with AGC the majority of frames are skipped. |
Can you elaborate on that? What do you mean with the majority of frames are skipped? Overflow should not be possible, or at least will cause an error due to rust. |
The voice that should be there is gone apart from fragments, you need to up the the SNR high and with AGC for some reason the voice will start to vanish whilst without agc the filter works perfect with high SNR. |
To be sure, you mean little noise with high SNR? Also, could you run with |
Lows low SNR I mean or high db noise https://imgur.com/gallery/qnjGwLP Top agc off bottom agc on
It was same song just playing close to mic with same constant voice input and the bottom dunno if clear but think you can see how its dropping voice frames with AGC. |
Hm that is strange, AGC should not affect noise reduction. What rms did you use? |
logs
|
Hm what version did you use? There should be messages like: |
Compiled from the agc branch earlier |
And you did run with |
I will compile again to check but reasonably sure its as above |
Ah now I know whats wrong. You did not set AGC rms to 0.5 (which is too high anyways) but the minimum processing threshold. This threshold deactivates any processing and just sets the output to zero. If you set it to 0.5 dB your output will be silenced if it is just a little noisy. This needs to stay around -10 dB. |
Apols Hendrick I thought there was just 2 controls as in ALSA its just ordinals so thought it was the 1st 2 It should be controls [ 84 xx 0.5 ] ? If I lower 0.5 to dunno say .2 |
Common values are |
controls [ 84 -10 30 20 0.2 ] just going to try as seem to be defaults apart from att & agc |
controls [ 84 -10 30 20 0.05 ] 0.2 too high Still seems to cut a tiny last portion of the ending samples controls [ 84 -15 30 20 0.05 ] seems to be better but thnx as it was just me I will work out the best settings but the default -10 seems to short and cuts trailing edge |
PS if you want to check with a KW model here is the one I have just been playing with
https://drive.google.com/file/d/1zmoGXOZ6gvH1czs2iTP1kLUPZx3qZp3N/view?usp=share_link TFlites in there |
PS only a tiny thing and purely for info as it works but left over time the gain creeps up so that you clip the 1st command. Thnx for your patience and great filter though. |
Closes #191