BinkanSalaryman / Discord-Audio-Stream-Bot

A simple discord audio streaming bot.
229 stars 39 forks source link

Request: Vox switch #76

Closed renfrewcountyscanner closed 1 year ago

renfrewcountyscanner commented 1 year ago

Hi,

I use your bot to stream police scanners, is there a way to have a VOX script? sometimes there is line noise from my scanner which my listeners hear, discord itself with vox mode on can be set high enough to not trigger. I was wondering if the bot could have such an option.

BinkanSalaryman commented 1 year ago

I have no idea what VOX is, or what kind of police scanners you run there. Without further info I cannot say anything about this.

renfrewcountyscanner commented 1 year ago

Oh sorry, this part of the Discord client VOX = Voice Activation/Activity. You are connected to the voice room but are not left open mic, only triggers when there is audio past a set limit.

image

BinkanSalaryman commented 1 year ago

If I got your request right, you wish the bot had a voice send threshold like the "voice activity" input mode feature in the official discord client to prevent quiet noise artifacts leaking through. Sure, seems simple enough.

renfrewcountyscanner commented 1 year ago

You got it right, downside of the Discord client is it cannot/will not rejoin a voice room if a disconnection happens or a reboot. your bot fills that gap quite effectively. I've been using it for awhile.

BinkanSalaryman commented 1 year ago

Latest release contains requested feature, please mind though I didn't add any interpolation or smoothing to this. If this is unbearing to use, please come back at me so I put brain power into a more sophisticated solution... 😅

renfrewcountyscanner commented 1 year ago

Going to reopen this per your request. I think the scale of the slider may be off, you barely need to move it and all audio stops, makes it hard to fine tune the Vox.

BinkanSalaryman commented 1 year ago

The slider goes from 1% to 99%. If the input's volume (absolute value of sample) is below that threshold it gets replaced with silence in the output. If all audio stops by enabling the feature, you probably should either try lowering the threshold slider or turn ing the volume of input stream up.