class Espeak::Speech
- Espeak::Speech
- Reference
- Object
Defined in:
espeak/speech.crConstant Summary
-
DEFAULT_CAPITAL =
1
-
DEFAULT_PITCH =
50
-
DEFAULT_QUIET =
true
-
DEFAULT_SPEED =
170
-
DEFAULT_VOICE =
"en"
-
Although espeak itself has default options I'm defining them here for easier generating command (with simple hash.merge)
Constructors
-
.new(text : String, *, voice : String = DEFAULT_VOICE, pitch : Int32 = DEFAULT_PITCH, speed : Int32 = DEFAULT_SPEED, capital : Int32 = DEFAULT_CAPITAL, quiet : Bool = DEFAULT_QUIET)
filename - The file that will be generated :voice - use voice file of this name from espeak-data/voices.
Instance Method Summary
-
#bytes
Returns mp3 file bytes as a result of Text-To-Speech conversion.
-
#bytes_wav
Returns wav file bytes as a result of Text-To-Speech conversion.
- #capital : Int32
- #pitch : Int32
- #quiet : Bool
-
#save(filename)
Generates mp3 file as a result of Text-To-Speech conversion.
-
#speak
Speaks text
- #speed : Int32
- #text : String
- #voice : String
Constructor Detail
filename - The file that will be generated :voice - use voice file of this name from espeak-data/voices. ie "en", "de", ... :pitch - pitch adjustment, 0 to 99 :speed - speed in words per minute, 80 to 370 :capital - increase emphasis of capitalized letters by raising pitch by this amount no range given in man but good range is 10-40 to start :quiet - remove printing to stdout. Affects only lame (default false)