lib/adhearsion-asr/prompt_builder.rb in adhearsion-asr-1.3.0 vs lib/adhearsion-asr/prompt_builder.rb in adhearsion-asr-1.4.0

- old
+ new

@@ -4,21 +4,21 @@ class PromptBuilder def initialize(output_document, grammars, options) input_options = { mode: options[:mode] || :dtmf, initial_timeout: timeout(options[:timeout] || Plugin.config.timeout), - inter_digit_timeout: timeout(options[:timeout] || Plugin.config.timeout), + inter_digit_timeout: timeout(options[:inter_digit_timeout] || Plugin.config.inter_digit_timeout), max_silence: timeout(options[:timeout] || Plugin.config.timeout), min_confidence: Plugin.config.min_confidence, grammars: grammars, recognizer: Plugin.config.recognizer, language: Plugin.config.input_language, terminator: options[:terminator] }.merge(options[:input_options] || {}) - @prompt = if output_document + @prompt = if output_document || options[:render_document] output_options = { - render_document: {value: output_document}, + render_document: options[:render_document] || {value: output_document}, renderer: Adhearsion.config.platform.media.default_renderer, voice: Adhearsion.config.platform.media.default_voice }.merge(options[:output_options] || {}) Punchblock::Component::Prompt.new output_options, input_options, barge_in: options.has_key?(:interruptible) ? options[:interruptible] : true