Sha256: dcdb9a67ce79cb44b9ad78b54de9b2b3747a2a5060f0724ff5e62d4d1e54bb31

Contents?: true

Size: 706 Bytes

Versions: 1

Compression:

Stored size: 706 Bytes

Contents

# encoding: utf-8

module Adhearsion
  class CallController
    module Output
      class AbstractPlayer

        attr_accessor :controller

        def initialize(controller)
          @controller = controller
        end

        def play_ssml(ssml, options = {})
          if [RubySpeech::SSML::Speak, Nokogiri::XML::Document].include? ssml.class
            output ssml, options
          end
        end

        def new_output(options)
          defaults = {}
          default_voice = Adhearsion.config.punchblock[:default_voice]
          defaults[:voice] = default_voice if default_voice

          Punchblock::Component::Output.new defaults.merge(options)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
adhearsion-2.2.0 lib/adhearsion/call_controller/output/abstract_player.rb