Class: RubyLLM::Agents::Speaker::VoiceSettings

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_llm/agents/audio/speaker.rb

Overview

Voice settings configuration class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeVoiceSettings

Returns a new instance of VoiceSettings.



221
222
223
224
225
226
# File 'lib/ruby_llm/agents/audio/speaker.rb', line 221

def initialize
  @stability_value = 0.5
  @similarity_boost_value = 0.75
  @style_value = 0.0
  @speaker_boost_value = true
end

Instance Attribute Details

#similarity_boost_valueObject



219
220
221
# File 'lib/ruby_llm/agents/audio/speaker.rb', line 219

def similarity_boost_value
  @similarity_boost_value
end

#speaker_boost_valueObject



219
220
221
# File 'lib/ruby_llm/agents/audio/speaker.rb', line 219

def speaker_boost_value
  @speaker_boost_value
end

#stability_valueObject



219
220
221
# File 'lib/ruby_llm/agents/audio/speaker.rb', line 219

def stability_value
  @stability_value
end

#style_valueObject



219
220
221
# File 'lib/ruby_llm/agents/audio/speaker.rb', line 219

def style_value
  @style_value
end

Instance Method Details

#similarity_boost(value) ⇒ Object



232
233
234
# File 'lib/ruby_llm/agents/audio/speaker.rb', line 232

def similarity_boost(value)
  @similarity_boost_value = value
end

#speaker_boost(value) ⇒ Object



240
241
242
# File 'lib/ruby_llm/agents/audio/speaker.rb', line 240

def speaker_boost(value)
  @speaker_boost_value = value
end

#stability(value) ⇒ Object



228
229
230
# File 'lib/ruby_llm/agents/audio/speaker.rb', line 228

def stability(value)
  @stability_value = value
end

#style(value) ⇒ Object



236
237
238
# File 'lib/ruby_llm/agents/audio/speaker.rb', line 236

def style(value)
  @style_value = value
end

#to_hObject



244
245
246
247
248
249
250
251
# File 'lib/ruby_llm/agents/audio/speaker.rb', line 244

def to_h
  {
    stability: stability_value,
    similarity_boost: similarity_boost_value,
    style: style_value,
    use_speaker_boost: speaker_boost_value
  }
end