Sha256: 5e1f56e9defa2716f89316c88dcd30da888f7632d55ce88fe53f68984355ed42

Contents?: true

Size: 729 Bytes

Versions: 9

Compression:

Stored size: 729 Bytes

Contents

# encoding: utf-8

require 'ruby_speech'

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

9 entries across 9 versions & 1 rubygems

Version Path
adhearsion-2.4.0.beta2 lib/adhearsion/call_controller/output/abstract_player.rb
adhearsion-2.4.0.beta1 lib/adhearsion/call_controller/output/abstract_player.rb
adhearsion-2.3.5 lib/adhearsion/call_controller/output/abstract_player.rb
adhearsion-2.3.4 lib/adhearsion/call_controller/output/abstract_player.rb
adhearsion-2.3.3 lib/adhearsion/call_controller/output/abstract_player.rb
adhearsion-2.3.2 lib/adhearsion/call_controller/output/abstract_player.rb
adhearsion-2.3.1 lib/adhearsion/call_controller/output/abstract_player.rb
adhearsion-2.3.0 lib/adhearsion/call_controller/output/abstract_player.rb
adhearsion-2.2.1 lib/adhearsion/call_controller/output/abstract_player.rb