Module: Blastr::TTS
- Defined in:
- lib/tts/tts.rb
Defined Under Namespace
Classes: Espeak, Festival, Say, TTSImplementation
Class Method Summary
collapse
Class Method Details
.resolve_tts_system ⇒ Object
48
49
50
51
52
53
54
|
# File 'lib/tts/tts.rb', line 48
def TTS::resolve_tts_system
return $tts unless $tts.nil?
[ Say.new, Espeak.new, Festival.new ].each do |impl|
return impl if impl.available?
end
raise "No TTS implementation found."
end
|
.speak(msg) ⇒ Object
56
57
58
59
60
|
# File 'lib/tts/tts.rb', line 56
def TTS::speak(msg)
msg.gsub!(/"/u, '\"')
msg.gsub!(/'/u, '\'')
resolve_tts_system.speak(normalize_for_speech(msg))
end
|