Computer Speech with Powershell

Posted Saturday, January 14, 2012 in Old JamesCMS Posts

Want your scripts to tell you how much they love you? Well, that's weird but this is what you'll need:

{{Powershell}}
function Speak ($text){            
    $voice = New-Object -com SAPI.SpVoice            
    [void] $voice.Speak($text)            
}