Class: Termit::SpeechSynthesizer
- Inherits:
-
Object
- Object
- Termit::SpeechSynthesizer
- Includes:
- CanOutput
- Defined in:
- lib/termit/speech_synthesizer.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options) ⇒ SpeechSynthesizer
constructor
A new instance of SpeechSynthesizer.
Methods included from CanOutput
Constructor Details
#initialize(options) ⇒ SpeechSynthesizer
Returns a new instance of SpeechSynthesizer.
7 8 9 10 11 |
# File 'lib/termit/speech_synthesizer.rb', line 7 def initialize check_sound_player @text = [:text] @url = Termit::UrlConstructor.new().url end |
Instance Method Details
#call ⇒ Object
13 14 15 16 |
# File 'lib/termit/speech_synthesizer.rb', line 13 def call response = Termit::SoundFetcher.new(@url, @text).data Termit::SoundResponseHandler.new(response.body).call end |