This commit is contained in:
kim
2026-06-27 17:33:50 +02:00
parent b0eb67df6a
commit 93bada3e4b
5 changed files with 13 additions and 2 deletions
+5 -2
View File
@@ -8,7 +8,7 @@ try {
# Check for command-line arguments
if (-not $args) {
Write-Error "Error: No text provided. Usage: .\speak.ps1 'Your Text Here'"
Write-Error "Error: No text provided. Usage: .\say.ps1 'Your Text Here'"
exit 1
}
@@ -20,8 +20,11 @@ $synth = New-Object System.Speech.Synthesis.SpeechSynthesizer
try {
#$synth.SelectVoice("Microsoft David Desktop")
$synth.SelectVoice("Microsoft Hazel Desktop")
#$synth.SelectVoice("Microsoft Hazel Desktop")
#$synth.SelectVoice("Microsoft Zira Desktop")
$synth.SelectVoice("Microsoft Mark")
#$synth.SelectVoice("Microsoft George")
#$synth.SelectVoice("Microsoft Susan")
# Speak the text
$synth.Speak($text)
#Write-Host "Text spoken successfully."