Skip to content

Instantly share code, notes, and snippets.

@cdhunt
Created July 29, 2013 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdhunt/6104251 to your computer and use it in GitHub Desktop.
Save cdhunt/6104251 to your computer and use it in GitHub Desktop.
Example of marrying REST API and Windows COM API through Powershell.
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