The Voice API allows the developer to change various properties and behaviour of voice chat.
You can override the OnVoicePlayed() method in Sandbox.Game to control what happens when other clients' voice data is coming through. Note that OnVoicePlayed is not called for your own client - only other clients.
By default, OnVoicePlayed populates a base UI component called VoiceList (base/UI/VoiceChat) as long as it exists in your game's UI (i.e adding
<VoiceList /> in a template or adding the class as a child in C#). By overriding OnVoicePlayed, you could customize what happens when a client hears voice however you choose.
VoiceSpeaker is another base UI component that shows when you are speaking instead of others.
You can access various properties on a client pertaining to voice. These allow you to access the voice properties of any client in your game.
Sandbox.Voice allows you to access additional properties based on the local client's voice.