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.

How To Use voice_mute

  1. Enable the developer console in Counter-Strike settings.
  2. Open the console with the tilde key (~).
  3. Enter voice_mute [Player #], replacing bracketed arguments with the value you want, then press Enter.

This legacy command is not currently listed as compatible with Counter-Strike 2.

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.