List-Voices
List installed text-to-speech voices
#requires -version 5.1
try {
Add-Type -AssemblyName System.Speech
$synth = New-Object System.Speech.Synthesis.SpeechSynthesizer
$synth.GetInstalledVoices() |
Select-Object -ExpandProperty VoiceInfo |
Select-Object -Property Name, Culture, Gender, Age
exit 0 # success
} catch {
"?? ERROR: $($Error[0]) (script line $($_.InvocationInfo.ScriptLineNumber))"
exit 1
}This script has no configurable parameters.