Sha256: 1362ebd27163da18bde6b70d1a0b911628d43badd287d7a2587f1881eebe7e95

Contents?: true

Size: 667 Bytes

Versions: 11

Compression:

Stored size: 667 Bytes

Contents

# encoding: utf-8

module Punchblock
  module Translator
    class Freeswitch
      module Component
        class TTSOutput < AbstractOutput
          private

          def do_output(engine, default_voice = nil)
            op = current_actor
            register_handler :es, :event_name => 'CHANNEL_EXECUTE_COMPLETE' do |event|
              op.send_complete_event! success_reason
            end
            voice = @component_node.voice || default_voice || 'kal'
            application :speak, [engine, voice, document].join('|')
          end

          def document
            @component_node.ssml.to_s
          end
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
punchblock-1.8.0 lib/punchblock/translator/freeswitch/component/tts_output.rb
punchblock-1.7.1 lib/punchblock/translator/freeswitch/component/tts_output.rb
punchblock-1.7.0 lib/punchblock/translator/freeswitch/component/tts_output.rb
punchblock-1.6.1 lib/punchblock/translator/freeswitch/component/tts_output.rb
punchblock-1.6.0 lib/punchblock/translator/freeswitch/component/tts_output.rb
punchblock-1.5.3 lib/punchblock/translator/freeswitch/component/tts_output.rb
punchblock-1.5.2 lib/punchblock/translator/freeswitch/component/tts_output.rb
punchblock-1.5.1 lib/punchblock/translator/freeswitch/component/tts_output.rb
punchblock-1.5.0 lib/punchblock/translator/freeswitch/component/tts_output.rb
punchblock-1.4.1 lib/punchblock/translator/freeswitch/component/tts_output.rb
punchblock-1.4.0 lib/punchblock/translator/freeswitch/component/tts_output.rb