Add speak-spanish.ps1

This commit is contained in:
Markus Fleschutz
2021-08-19 12:11:22 +02:00
parent 917825b5a7
commit 415d4a339d
7 changed files with 40 additions and 6 deletions

View File

@@ -22,13 +22,11 @@ try {
foreach ($OtherVoice in $Voices) {
$Description = $OtherVoice.GetDescription()
if ($Description -notlike "*- English*") { continue }
# write-progress "$Text"
$Voice.Voice = $OtherVoice
[void]$Voice.Speak($Text)
# write-progress -complete "$Text"
exit 0
}
write-error "Sorry, no English text-to-speech (TTS) voice found"
write-error "No English text-to-speech voice found - please install one"
exit 1
} catch {
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"