Monday, December 4, 2017

Powershell: Counter with speech



This is a basic counter with speech:

# Making a speech object:
Add-Type -AssemblyName System.speech
$speak = New-Object System.Speech.Synthesis.SpeechSynthesizer

# The counter with speech:
$i = 0 
while( $i -le 100){
  $speak.Speak($i)
  $i++
}