-
-
Save juandebravo/1358556 to your computer and use it in GitHub Desktop.
This file contains 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 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