Fairly sure we had something like this before as others said, and the point Am_seal brought up is important.
As I'm sure
@Noodl will tell you, having it check for actual input coming from the mic vs. just pressing v and no input coming through might be a pain to code (but I have faith in you Noodl boy, though I'm sure you'd rather be working on something else).
This also doesn't really fix the issue of inaudible mics or too quiet ones.
Incorrect.
Time for a lesson on plugins.
The old mic checking feature of JB uses something called VoiceHooks. VH uses virtual functions from TF2's engine binary.
These vfunctions are stored in a vtable of pointers to each function. Each vtable is part of a class, and each pointer to a vfunc is another member variable of the vtable, an array of function pointer, 1 position apart from the other. The one we want is CGameClient::VoiceDataProcessed, at 70 pointers offset from the CGameClient vtable. The offsets that were last supplied with the plugin before the author stopped supporting tf were the ones that caused the lag on voice transmission.
I decompiled the server binary, and found the new offsets for the functions, but they don't make any forwards fire. No lag, no errors, no firing functions. So I don't know what to do, other than rewrite VoiceHooks myself. But I have other, more interesting things I want to do. Plus I'm back at uni now.
Tl;dr, the plugin JB used is no longer supported for tf.