Class: OpenHAB::Core::Actions::Voice
- Inherits:
-
Object
- Object
- OpenHAB::Core::Actions::Voice
- Defined in:
- lib/openhab/core/actions/voice.rb
Overview
Class Method Summary collapse
-
.say(text, voice: nil, sink: nil, volume: nil) ⇒ void
Say text via openHAB Text-To-Speech service, Voice.say().
Class Method Details
.say(text, voice: nil, sink: nil, volume: nil) ⇒ void
This method returns an undefined value.
Say text via openHAB Text-To-Speech service, Voice.say()
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/openhab/core/actions/voice.rb', line 25 def say(text, voice: nil, sink: nil, volume: nil) volume = PercentType.new(volume) unless volume.is_a?(PercentType) || volume.nil? java_send :say, [java.lang.Object, java.lang.String, java.lang.String, org.openhab.core.library.types.PercentType], text.to_s, voice&.to_s, sink&.to_s, volume end |