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

VOICE_FORCEMICRECORD

CS:GO

This command, if set to 0, will make CS:GO not use your operating system's device set as the default microphone device.

Syntax
voice_forcemicrecord [0 / 1]

Description

This command, if set to 0, will make CS:GO not use your operating system's device set as the default microphone device.

How To Use voice_forcemicrecord

  1. Enable the developer console in Counter-Strike settings.
  2. Open the console with the tilde key (~).
  3. Enter voice_forcemicrecord [0 / 1], 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_forcemicrecord [0 / 1]
0 / 1 Set to 0 to make CS:GO not use the device set as default microphone in your operating system. Set to 1 to use default operating system microphone (default, recommended setting).