Class: Termit::SpeechSynthesizer
- Inherits:
-
Object
- Object
- Termit::SpeechSynthesizer
- Defined in:
- lib/termit/speech_synthesizer.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options) ⇒ SpeechSynthesizer
constructor
A new instance of SpeechSynthesizer.
Constructor Details
#initialize(options) ⇒ SpeechSynthesizer
Returns a new instance of SpeechSynthesizer.
4 5 6 7 8 |
# File 'lib/termit/speech_synthesizer.rb', line 4 def initialize check_sound_player @text = [:text] @url = Termit::UrlConstructor.new().url end |
Instance Method Details
#call ⇒ Object
10 11 12 13 |
# File 'lib/termit/speech_synthesizer.rb', line 10 def call response = Termit::DataFetcher.new(@url, @text).data Termit::SoundResponseHandler.new(response.body).call end |