Method: Adhearsion::CallController::Output#say

Defined in:
lib/adhearsion/call_controller/output.rb

#say(text, options = {}) ⇒ Object Also known as: speak

Speak output using text-to-speech (TTS)

Parameters:

  • text (String, #to_s)

    The text to be rendered

  • options (Hash) (defaults to: {})

    A set of options for output. Includes everything in Adhearsion::Rayo::Component::Output.new.

Raises:



25
26
27
28
# File 'lib/adhearsion/call_controller/output.rb', line 25

def say(text, options = {})
  return unless text
  player.play_ssml(text, options) || player.output(output_formatter.ssml_for_text(text.to_s), options)
end