RevoluPowered / one-voip-godot-4

One voip plugin to rule them all
MIT License
60 stars 4 forks source link

Input Threshold for reduced background noise? #12

Open Pillber opened 7 months ago

Pillber commented 7 months ago

I've tried using this plugin, and it works great! However, I noticed there is no way to set an input threshold, and by default too much background noise for my liking is caught.

I don't know how speex and opus would handle this, but I would assume there is some way in _sample_buf_to_packet to have an input threshold value checked against to stop sending packets (or send empty packets?) if the maximum value doesn't exceed the input threshold.

I am suggesting this because I am right at the end of finals and can't implement this myself, and it is not a feature that can be easily implemented on the GDScript side of things.

marc-weber1 commented 7 months ago

Helo, the way the VOIP is designed is so that you can put any effect you want on the mic bus before the VOIPInputCapture, but it doesnt look like godot has any gate effect and it doesnt work with CLAP plugins >:

https://github.com/godotengine/godot-proposals/issues/8426

basic noise gates are some of the easiest effects to code (as long as u are not expecting krisp quality) so I could try and make one for u in a separate repository, but it will be annoying since I'd have to get used to the godot way of making plugins

Pillber commented 7 months ago

It's okay, I'll look into it myself first. Thanks for the info though, I would not have thought about changing the bus structure! With finals almost done, I should have time soon to put some real work in

marc-weber1 commented 7 months ago

https://github.com/marc-weber1/godot/tree/gate-sound-effect

my hand slipped,

marc-weber1 commented 7 months ago

https://github.com/godotengine/godot/pull/86104

Pillber commented 7 months ago

Holy moly you move fast! I'll keep an eye on that to see how it goes!

ismailgamedev commented 1 month ago

https://github.com/marc-weber1/godot/tree/gate-sound-effect

my hand slipped,

What's the problem? Why hasn't it been merged yet?

marc-weber1 commented 1 month ago

idk i think they just forgot u can bug them if u want

leopeltola commented 1 week ago

Until the pull request is merged there's this [https://github.com/Visssarion/audio-gate]().

Seems to mostly use the same code but is implemented as an addon