Skip to content

Instantly share code, notes, and snippets.

@juandebravo
Forked from benlangfeld/output.rb
Created November 11, 2011 17:03
Show Gist options
  • Save juandebravo/1358556 to your computer and use it in GitHub Desktop.
Save juandebravo/1358556 to your computer and use it in GitHub Desktop.
def play(*arguments)
result = true
arguments.each do |argument|
case argument
when Hash
value = argument.delete(:value)
play_ssml_for(value, argument)
when RubySpeech::SSML::Speak
play_ssml argument
else
play_ssml_for(argument)
end
end
end
def play!(*arguments)
play *arguments || raise Adhearsion::PlaybackError, "One of the passed outputs is invalid"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment