diff --git a/Scripts/speak-test.ps1 b/Scripts/speak-test.ps1 index 4649e7e8..9d0d68ac 100755 --- a/Scripts/speak-test.ps1 +++ b/Scripts/speak-test.ps1 @@ -8,27 +8,38 @@ try { $Voice = new-object -ComObject SAPI.SPVoice - $Result = $Voice.Speak("This is the default voice") + $DefaultVolume = $Voice.volume + $DefaultRate = $Voice.rate + $Result = $Voice.Speak("This is the default voice with default volume $DefaultVolume and speed $DefaultRate") - $Voice.rate = 8 - $Result = $Voice.Speak("Let's speak very, very fast") $Voice.rate = -10 $Result = $Voice.Speak("Let's speak very, very slow") - $Voice.rate = 0 + $Voice.rate = -5 + $Result = $Voice.Speak("Let's speak very slow") + $Voice.rate = 2 + $Result = $Voice.Speak("Let's speak fast") + $Voice.rate = 5 + $Result = $Voice.Speak("Let's speak very fast") + $Voice.rate = 10 + $Result = $Voice.Speak("Let's speak very, very fast") + $Voice.rate = $DefaultRate - $PrevVolume = $Voice.Volume $Voice.volume = 100 - $Result = $Voice.Speak("Let's speak with maximum volume") + $Result = $Voice.Speak("Let's try 100% volume") + $Voice.volume = 75 + $Result = $Voice.Speak("Let's try 75% volume") $Voice.volume = 50 - $Result = $Voice.Speak("Let's speak with half volume") - $Voice.volume = $PrevVolume + $Result = $Voice.Speak("Let's try 50% volume") + $Voice.volume = 25 + $Result = $Voice.Speak("Let's try 25% volume") + $Voice.volume = $DefaultVolume $Voices = $Voice.GetVoices() foreach ($OtherVoice in $Voices) { $Description = $OtherVoice.GetDescription() - write-output "This is: $Description" + write-output "Voice: $Description" $Voice.Voice = $OtherVoice - $Result = $Voice.Speak("1 2 3 - this is $Description") + $Result = $Voice.Speak("Hello, I'm the voice called $Description") } exit 0 } catch {