When you say class, I'm assuming you mean ULX group/rank.
this should work, chuck it in lua/autorun.
hook.Add("PlayerCanHearPlayersVoice", "stopannoyingmicspammersandsqueakers", function(listener, talker)
if ( talker:GetUserGroup() == "RANK" ) then
return false
else
return true
end
end
Whilst in game, create a new rank in ULX, call it what ever you want.
Then rename RANK in the code to that new ULX rank.
This may work.
EDIT:
Oops. forgot parentheses