Class: AudioBookCreator::SpeakerDef

Inherits:
Object
  • Object
show all
Defined in:
lib/audio_book_creator/speaker_def.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ SpeakerDef

Returns a new instance of SpeakerDef.



25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/audio_book_creator/speaker_def.rb', line 25

def initialize(options = {})
  options.each { |n, v| public_send("#{n}=", v) }

  # for speaking the chapter
  @voice    ||= "Vicki"
  @rate     ||= 280

  # for binding the book
  @channels  ||= 1
  @bit_rate  ||= 32
  @max_hours ||= 7
  @sample_rate ||= 22_050
end

Instance Attribute Details

#bit_rateObject

Returns the value of attribute bit_rate.



21
22
23
# File 'lib/audio_book_creator/speaker_def.rb', line 21

def bit_rate
  @bit_rate
end

#channelsObject

Returns the value of attribute channels.



18
19
20
# File 'lib/audio_book_creator/speaker_def.rb', line 18

def channels
  @channels
end

#max_hoursObject

split on this hour mark



20
21
22
# File 'lib/audio_book_creator/speaker_def.rb', line 20

def max_hours
  @max_hours
end

#rateObject

Returns the value of attribute rate.



16
17
18
# File 'lib/audio_book_creator/speaker_def.rb', line 16

def rate
  @rate
end

#regen_audioObject

Returns the value of attribute regen_audio.



23
24
25
# File 'lib/audio_book_creator/speaker_def.rb', line 23

def regen_audio
  @regen_audio
end

#sample_rateObject

Returns the value of attribute sample_rate.



22
23
24
# File 'lib/audio_book_creator/speaker_def.rb', line 22

def sample_rate
  @sample_rate
end

#voiceObject

currently like the following voices: Vicki # 10 Serena # 8 UK Allison # ? (ok) Moira # 7 Irish Fiona # 5 Scottish Kate # 4 UK Susan # 2 Zosia # 0 Poland Angelica # 0 Mexican? Paulina # 0 Mexican



15
16
17
# File 'lib/audio_book_creator/speaker_def.rb', line 15

def voice
  @voice
end