Skip to content

Instantly share code, notes, and snippets.

@ryancastro
Created October 24, 2014 14:15
Show Gist options
  • Save ryancastro/366fa4b8f649496cde59 to your computer and use it in GitHub Desktop.
Save ryancastro/366fa4b8f649496cde59 to your computer and use it in GitHub Desktop.
Speaking through windows Voice API
def speak sentence
sentence = sentence.gsub /'/, "''"
`powershell.exe -c $speaker = new-object -com SAPI.SpVoice; $speaker.Speak('#{sentence}');`
end
speak "Hello."
@mattroyer
Copy link

It only speaks the last 5 tweets of the user you put in, but I know somewhere in their api you can change how many it returns.

Also, I had to use the OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE hack to get it going because I don't have things setup right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment