Skip to content

Instantly share code, notes, and snippets.

@phumberdroz
Created June 20, 2026 17:44
Show Gist options
  • Select an option

  • Save phumberdroz/f91512b8131d556d10f6dbe6b8aa7f15 to your computer and use it in GitHub Desktop.

Select an option

Save phumberdroz/f91512b8131d556d10f6dbe6b8aa7f15 to your computer and use it in GitHub Desktop.
Disable Microsoft Voice Clarity / Voice Focus on Windows 11

Disable Microsoft Voice Clarity / Voice Focus on Windows 11

This gist disables the Windows 11 Microsoft Voice Clarity / Voice Focus audio-processing component in a way that survives Settings refreshes, device rescans, and the driver being restaged.

It is meant for systems where the Windows Settings app keeps showing Audio enhancements -> Voice Clarity or Voice Focus -> Automatic for microphone input devices even after toggling audio enhancements off.

What it does

Disable-VoiceClarity-Reliable.ps1:

  1. Self-elevates with a UAC prompt.

  2. Adds a local Device Installation Restriction policy blocking this hardware ID:

    SWC\VEN_MSFT&AUDIO_EFFECTPACK_VOICECLARITY
    
  3. Adds a retroactive block for the known Voice Clarity device instance:

    SWD\DRIVERENUM\{96bedf2c-18cb-4a15-b821-5e95ed0fea61}#VocaEffectPack&1&6b31f1d&0
    
  4. Removes the Voice Clarity software component device.

  5. Deletes any published voiceclarityep_audio_component.inf package from the Windows DriverStore.

  6. Runs a device scan and deletes the package again if Windows restages it.

  7. Writes a log and exported driver backup under %TEMP%.

This can make the Voice Clarity option disappear from Windows Settings. That is expected: Windows is being told not to install that audio-processing component.

Run

Download all files from this gist, keep the .cmd and .ps1 files in the same folder, then double-click:

Disable-VoiceClarity-Reliable.cmd

Or run from PowerShell:

powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\Disable-VoiceClarity-Reliable.ps1

Undo

To remove the local block policy, double-click:

Undo-VoiceClarity-Block.cmd

Or run:

powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\Undo-VoiceClarity-Block.ps1

After undoing, Windows may reinstall Voice Clarity on the next hardware scan, reboot, or driver update.

Check state

Run this in PowerShell:

pnputil /enum-devices /instanceid "SWD\DRIVERENUM\{96bedf2c-18cb-4a15-b821-5e95ed0fea61}#VocaEffectPack&1&6b31f1d&0" /properties /drivers

When blocked, you may see:

Problem Code: 28 (0x1C) [CM_PROB_FAILED_INSTALL]
The installation of this device is forbidden by system policy.

You can also check that Voice Clarity is not running as an Audio Processing Object:

pnputil /enum-drivers /class AudioProcessingObject /devices

Notes

  • This uses Windows-supported mechanisms: local Device Installation Restrictions plus pnputil.
  • It does not disable your microphone or all audio effects. It targets the Microsoft Voice Clarity effect-pack component.
  • You should still keep your normal audio driver packages, such as Realtek, SteelSeries Sonar, etc.
  • Windows updates may try to stage the package again; the block policy is what keeps it from becoming active.
@echo off
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0Disable-VoiceClarity-Reliable.ps1"
param(
[switch]$NoPause
)
$isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(
[Security.Principal.WindowsBuiltInRole]::Administrator
)
if (-not $isAdmin) {
$argsList = @('-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', "`"$PSCommandPath`"")
if ($NoPause) { $argsList += '-NoPause' }
Start-Process -FilePath powershell.exe -ArgumentList $argsList -Verb RunAs
exit
}
$ErrorActionPreference = 'Continue'
$instanceId = 'SWD\DRIVERENUM\{96bedf2c-18cb-4a15-b821-5e95ed0fea61}#VocaEffectPack&1&6b31f1d&0'
$hardwareId = 'SWC\VEN_MSFT&AUDIO_EFFECTPACK_VOICECLARITY'
$className = 'AudioProcessingObject'
$stamp = Get-Date -Format 'yyyyMMdd_HHmmss'
$logDir = Join-Path $env:TEMP "VoiceClarityDisable_$stamp"
New-Item -ItemType Directory -Path $logDir -Force | Out-Null
$log = Join-Path $logDir 'disable-voice-clarity.log'
function Write-Log {
param([string]$Message)
$line = "[{0}] {1}" -f (Get-Date -Format 'yyyy-MM-dd HH:mm:ss'), $Message
$line | Tee-Object -FilePath $log -Append
}
function Run-External {
param(
[string]$FilePath,
[string[]]$Arguments
)
Write-Log "$FilePath $($Arguments -join ' ')"
$output = & $FilePath @Arguments 2>&1
$code = $LASTEXITCODE
foreach ($line in $output) {
Write-Log " $line"
}
Write-Log " ExitCode=$code"
return $code
}
function Set-PolicyDword {
param([string]$Path, [string]$Name, [int]$Value)
New-ItemProperty -Path $Path -Name $Name -PropertyType DWord -Value $Value -Force | Out-Null
Write-Log "Set $Path\$Name = $Value (DWORD)"
}
function Set-PolicyString {
param([string]$Path, [string]$Name, [string]$Value)
New-ItemProperty -Path $Path -Name $Name -PropertyType String -Value $Value -Force | Out-Null
Write-Log "Set $Path\$Name = $Value (REG_SZ)"
}
function Get-VoiceClarityPublishedInfs {
$lines = & pnputil /enum-drivers /class $className /ids 2>&1
$currentPublished = $null
$currentOriginal = $null
$results = New-Object System.Collections.Generic.List[string]
foreach ($line in $lines) {
if ($line -match '^\s*Published Name:\s+(.+?)\s*$') {
$currentPublished = $Matches[1].Trim()
$currentOriginal = $null
continue
}
if ($line -match '^\s*Original Name:\s+(.+?)\s*$') {
$currentOriginal = $Matches[1].Trim()
}
if ($currentPublished -and $currentOriginal -ieq 'voiceclarityep_audio_component.inf') {
[void]$results.Add($currentPublished)
$currentPublished = $null
$currentOriginal = $null
}
}
return $results | Select-Object -Unique
}
Write-Host ''
Write-Host 'Disabling Microsoft Voice Clarity / Voice Focus...' -ForegroundColor Cyan
Write-Log "Log folder: $logDir"
$policyKey = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeviceInstall\Restrictions'
$policyReg = 'HKLM\SOFTWARE\Policies\Microsoft\Windows\DeviceInstall\Restrictions'
$policyBackup = Join-Path $logDir 'DeviceInstallRestrictions-before.reg'
Run-External 'reg.exe' @('export', $policyReg, $policyBackup, '/y') | Out-Null
New-Item -Path $policyKey -Force | Out-Null
$denyIdsKey = Join-Path $policyKey 'DenyDeviceIDs'
$denyInstancesKey = Join-Path $policyKey 'DenyDeviceInstanceIDs'
New-Item -Path $denyIdsKey -Force | Out-Null
New-Item -Path $denyInstancesKey -Force | Out-Null
Set-PolicyDword $policyKey 'DenyDeviceIDs' 1
Set-PolicyDword $policyKey 'DenyDeviceIDsRetroactive' 1
Set-PolicyString $denyIdsKey '1' $hardwareId
Set-PolicyDword $policyKey 'DenyDeviceInstanceIDs' 1
Set-PolicyDword $policyKey 'DenyDeviceInstanceIDsRetroactive' 1
Set-PolicyString $denyInstancesKey '1' $instanceId
Get-Process SystemSettings -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
Run-External 'gpupdate.exe' @('/target:computer', '/force') | Out-Null
$infs = @(Get-VoiceClarityPublishedInfs)
foreach ($inf in $infs) {
Run-External 'pnputil.exe' @('/export-driver', $inf, $logDir) | Out-Null
}
Run-External 'pnputil.exe' @('/remove-device', $instanceId, '/subtree', '/force') | Out-Null
$infs = @($infs + @(Get-VoiceClarityPublishedInfs) | Select-Object -Unique)
foreach ($inf in $infs) {
Run-External 'pnputil.exe' @('/delete-driver', $inf, '/force') | Out-Null
}
Run-External 'pnputil.exe' @('/scan-devices') | Out-Null
$infs = @(Get-VoiceClarityPublishedInfs)
foreach ($inf in $infs) {
Run-External 'pnputil.exe' @('/delete-driver', $inf, '/force') | Out-Null
}
Write-Log 'Final Voice Clarity device state:'
Run-External 'pnputil.exe' @('/enum-devices', '/instanceid', $instanceId, '/properties', '/drivers') | Out-Null
Write-Log 'Final AudioProcessingObject driver packages:'
Run-External 'pnputil.exe' @('/enum-drivers', '/class', $className, '/devices') | Out-Null
Write-Host ''
Write-Host 'Done. Voice Clarity is blocked by local device-install policy.' -ForegroundColor Green
Write-Host "Log and driver backup: $logDir"
Write-Host 'Close and reopen Windows Settings before checking the microphone page.'
if (-not $NoPause) {
Write-Host ''
Read-Host 'Press Enter to close'
}
@echo off
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0Undo-VoiceClarity-Block.ps1"
param(
[switch]$NoPause
)
$isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(
[Security.Principal.WindowsBuiltInRole]::Administrator
)
if (-not $isAdmin) {
$argsList = @('-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', "`"$PSCommandPath`"")
if ($NoPause) { $argsList += '-NoPause' }
Start-Process -FilePath powershell.exe -ArgumentList $argsList -Verb RunAs
exit
}
$ErrorActionPreference = 'Continue'
$policyKey = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeviceInstall\Restrictions'
$instanceId = 'SWD\DRIVERENUM\{96bedf2c-18cb-4a15-b821-5e95ed0fea61}#VocaEffectPack&1&6b31f1d&0'
$stamp = Get-Date -Format 'yyyyMMdd_HHmmss'
$logDir = Join-Path $env:TEMP "VoiceClarityUndo_$stamp"
New-Item -ItemType Directory -Path $logDir -Force | Out-Null
$log = Join-Path $logDir 'undo-voice-clarity-block.log'
function Write-Log {
param([string]$Message)
$line = "[{0}] {1}" -f (Get-Date -Format 'yyyy-MM-dd HH:mm:ss'), $Message
$line | Tee-Object -FilePath $log -Append
}
function Remove-PolicyValue {
param([string]$Path, [string]$Name)
Remove-ItemProperty -Path $Path -Name $Name -Force -ErrorAction SilentlyContinue
Write-Log "Removed $Path\$Name when present"
}
Write-Host ''
Write-Host 'Removing the local Voice Clarity device-install block...' -ForegroundColor Cyan
Write-Log "Log folder: $logDir"
Remove-PolicyValue $policyKey 'DenyDeviceIDs'
Remove-PolicyValue $policyKey 'DenyDeviceIDsRetroactive'
Remove-PolicyValue $policyKey 'DenyDeviceInstanceIDs'
Remove-PolicyValue $policyKey 'DenyDeviceInstanceIDsRetroactive'
Remove-Item -Path (Join-Path $policyKey 'DenyDeviceIDs') -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path (Join-Path $policyKey 'DenyDeviceInstanceIDs') -Recurse -Force -ErrorAction SilentlyContinue
Get-Process SystemSettings -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue
& gpupdate.exe /target:computer /force 2>&1 | ForEach-Object { Write-Log " $_" }
& pnputil.exe /scan-devices 2>&1 | ForEach-Object { Write-Log " $_" }
& pnputil.exe /enum-devices /instanceid $instanceId /properties /drivers 2>&1 | ForEach-Object { Write-Log " $_" }
Write-Host ''
Write-Host 'Done. The block policy is removed.' -ForegroundColor Green
Write-Host "Log: $logDir"
Write-Host 'Windows may reinstall Voice Clarity on the next scan or reboot.'
if (-not $NoPause) {
Write-Host ''
Read-Host 'Press Enter to close'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment