Module: Punchblock::MediaContainer
- Included in:
- Component::Output, 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:
38 39 40 |
# File 'lib/punchblock/media_container.rb', line 38 def inspect_attributes # :nodoc: [:voice, :ssml] + super end |
#ssml ⇒ String
Returns the SSML document to render TTS.
22 23 24 25 |
# File 'lib/punchblock/media_container.rb', line 22 def ssml node = children.first RubySpeech::SSML.import node if node end |
#ssml=(ssml) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/punchblock/media_container.rb', line 30 def ssml=(ssml) return unless ssml unless ssml.is_a?(RubySpeech::SSML::Element) ssml = RubySpeech::SSML.import ssml end self << ssml end |
#voice ⇒ String
Returns the TTS voice to use.
8 9 10 |
# File 'lib/punchblock/media_container.rb', line 8 def voice read_attr :voice end |
#voice=(voice) ⇒ Object
15 16 17 |
# File 'lib/punchblock/media_container.rb', line 15 def voice=(voice) write_attr :voice, voice end |