Update list-voices.ps1

This commit is contained in:
Markus Fleschutz 2021-10-07 11:27:34 +02:00 committed by GitHub
parent d92d477f9a
commit 00eaa9b4a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,8 @@
<# <#
.SYNOPSIS .SYNOPSIS
Lists the installed text-to-speech (TTS) voices Lists the installed text-to-speech voices
.DESCRIPTION .DESCRIPTION
list-voices.ps1 This script lists the installed text-to-speech voices. It requires PowerShell 2.0 or higher.
.EXAMPLE .EXAMPLE
PS> ./list-voices PS> ./list-voices
@ -24,7 +24,6 @@ try {
$Synth.GetInstalledVoices() | $Synth.GetInstalledVoices() |
Select-Object -ExpandProperty VoiceInfo | Select-Object -ExpandProperty VoiceInfo |
Select-Object -Property Name, Culture, Gender, Age Select-Object -Property Name, Culture, Gender, Age
exit 0 # success exit 0 # success
} catch { } catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"