NB! It seems this console command is not compatible with CS2.
Command Profile

VOICE_MUTE

CS:GO

This command mutes the user with the specified ID. Find the ID of a user with the voice_show_mute command.

Syntax
voice_mute [Player #]

Description

This command mutes the user with the specified ID. Find the ID of a user with the voice_show_mute command.

Syntax And Arguments

voice_mute [Player #]
Player # The player # of the user you wish to mute, find player numbers by typing "voice_show_mute" (without quotes) into the console.