Class: RunApi::Elevenlabs::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/runapi/elevenlabs/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key: nil, **options) ⇒ Client

Returns a new instance of Client.



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/runapi/elevenlabs/client.rb', line 8

def initialize(api_key: nil, **options)
  @api_key = Core::Auth.resolve_api_key(api_key)

  client_options = Core::ClientOptions.new(api_key: @api_key, **options)
  http = client_options.http_client || Core::HttpClient.new(client_options)

  @text_to_speech = Resources::TextToSpeech.new(http)
  @text_to_dialogue = Resources::TextToDialogue.new(http)
  @text_to_sound = Resources::TextToSound.new(http)
  @speech_to_text = Resources::SpeechToText.new(http)
  @isolate_audio = Resources::IsolateAudio.new(http)
end

Instance Attribute Details

#isolate_audioObject (readonly)

Returns the value of attribute isolate_audio.



6
7
8
# File 'lib/runapi/elevenlabs/client.rb', line 6

def isolate_audio
  @isolate_audio
end

#speech_to_textObject (readonly)

Returns the value of attribute speech_to_text.



6
7
8
# File 'lib/runapi/elevenlabs/client.rb', line 6

def speech_to_text
  @speech_to_text
end

#text_to_dialogueObject (readonly)

Returns the value of attribute text_to_dialogue.



6
7
8
# File 'lib/runapi/elevenlabs/client.rb', line 6

def text_to_dialogue
  @text_to_dialogue
end

#text_to_soundObject (readonly)

Returns the value of attribute text_to_sound.



6
7
8
# File 'lib/runapi/elevenlabs/client.rb', line 6

def text_to_sound
  @text_to_sound
end

#text_to_speechObject (readonly)

Returns the value of attribute text_to_speech.



6
7
8
# File 'lib/runapi/elevenlabs/client.rb', line 6

def text_to_speech
  @text_to_speech
end