Created
October 24, 2014 14:15
-
-
Save ryancastro/366fa4b8f649496cde59 to your computer and use it in GitHub Desktop.
Speaking through windows Voice API
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
def speak sentence | |
sentence = sentence.gsub /'/, "''" | |
`powershell.exe -c $speaker = new-object -com SAPI.SpVoice; $speaker.Speak('#{sentence}');` | |
end | |
speak "Hello." |
mattroyer
commented
Jan 30, 2015
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