Created
July 29, 2013 13:20
-
-
Save cdhunt/6104251 to your computer and use it in GitHub Desktop.
Example of marrying REST API and Windows COM API through Powershell.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Out-Speech($text) { | |
$speechy = New-Object –ComObject SAPI.SPVoice; | |
$text | |
$voices = $speechy.GetVoices(); | |
foreach ($voice in $voices) { | |
$voice.GetDescription(); | |
$speechy.Voice = $voice; | |
$speechy.Speak($text); | |
} | |
} | |
Out-Speech (irm https://foaas.herokuapp.com/shakespeare/you/me) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment