Module: Punchblock::MediaContainer
- Included in:
- Component::Output, Component::Tropo::Say, MediaNode
- Defined in:
- lib/punchblock/media_container.rb
Instance Method Summary collapse
-
#inspect_attributes ⇒ Object
:nodoc:.
-
#ssml ⇒ String
The SSML document to render TTS.
- #ssml=(ssml) ⇒ Object
-
#voice ⇒ String
The TTS voice to use.
- #voice=(voice) ⇒ Object
Instance Method Details
#inspect_attributes ⇒ Object
:nodoc:
35 36 37 |
# File 'lib/punchblock/media_container.rb', line 35 def inspect_attributes # :nodoc: [:voice, :ssml] + super end |
#ssml ⇒ String
Returns the SSML document to render TTS.
20 21 22 |
# File 'lib/punchblock/media_container.rb', line 20 def ssml children.to_xml end |
#ssml=(ssml) ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/punchblock/media_container.rb', line 27 def ssml=(ssml) if ssml.instance_of?(String) self << RayoNode.new('').parse(ssml) do |config| config.noblanks.strict end end end |
#voice ⇒ String
Returns the TTS voice to use.
6 7 8 |
# File 'lib/punchblock/media_container.rb', line 6 def voice read_attr :voice end |
#voice=(voice) ⇒ Object
13 14 15 |
# File 'lib/punchblock/media_container.rb', line 13 def voice=(voice) write_attr :voice, voice end |