Class: Motion::Speech::Utterance
- Inherits:
-
AVSpeechUtterance
- Object
- AVSpeechUtterance
- Motion::Speech::Utterance
- Defined in:
- lib/motion/speech/utterance.rb
Instance Method Summary collapse
-
#initialize(speakable, options = {}) ⇒ Utterance
constructor
A new instance of Utterance.
- #setRate(multiplier) ⇒ Object (also: #rate=)
- #setSpeechString(speakable) ⇒ Object (also: #message=)
Constructor Details
#initialize(speakable, options = {}) ⇒ Utterance
Returns a new instance of Utterance.
5 6 7 8 9 10 11 |
# File 'lib/motion/speech/utterance.rb', line 5 def initialize(speakable, ={}) self. = speakable self.rate = .fetch(:rate, 0.15) self.pitch = .fetch(:pitch, 1.0) self.voice = .fetch(:voice, nil) self.volume = .fetch(:volume, 1.0) end |
Instance Method Details
#setRate(multiplier) ⇒ Object Also known as: rate=
17 18 19 |
# File 'lib/motion/speech/utterance.rb', line 17 def setRate(multiplier) super rate_for_symbol_or_float(multiplier) end |
#setSpeechString(speakable) ⇒ Object Also known as: message=
13 14 15 |
# File 'lib/motion/speech/utterance.rb', line 13 def setSpeechString(speakable) super string_from_speakable(speakable) end |