Skip to content

Instantly share code, notes, and snippets.

@srbiv
Created March 8, 2012 16:15
Show Gist options
  • Save srbiv/2001832 to your computer and use it in GitHub Desktop.
Save srbiv/2001832 to your computer and use it in GitHub Desktop.
module AudioGenerator
require 'rest_client'
require 'xmlsimple'
attr_accessor :host
def initialize
self.host = "XXXXXX"
end
def get_audio
binding.pry
response = RestClient.post(self.host, request_string)
end
def request_string
'<TTSRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><EnglishText>Sample text.</EnglishText><Rate>0</Rate><Volume>100</Volume><Voice>Microsoft_Anna</Voice><OutputType>mp3</OutputType></TTSRequest>'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment