Class: RunApi::Suno::Client

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Client.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/runapi/suno/client.rb', line 13

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_music = Resources::TextToMusic.new(http)
  @extend_music = Resources::ExtendMusic.new(http)
  @generate_artwork = Resources::GenerateArtwork.new(http)
  @cover_audio = Resources::CoverAudio.new(http)
  @add_instrumental = Resources::AddInstrumental.new(http)
  @add_vocals = Resources::AddVocals.new(http)
  @separate_audio_stems = Resources::SeparateAudioStems.new(http)
  @generate_midi = Resources::GenerateMidi.new(http)
  @convert_audio = Resources::ConvertAudio.new(http)
  @visualize_music = Resources::VisualizeMusic.new(http)
  @generate_lyrics = Resources::GenerateLyrics.new(http)
  @get_timestamped_lyrics = Resources::GetTimestampedLyrics.new(http)
  @replace_section = Resources::ReplaceSection.new(http)
  @create_mashup = Resources::CreateMashup.new(http)
  @text_to_sound = Resources::TextToSound.new(http)
  @voice_to_validation_phrase = Resources::VoiceToValidationPhrase.new(http)
  @regenerate_validation_phrase = Resources::RegenerateValidationPhrase.new(http)
  @generate_voice = Resources::GenerateVoice.new(http)
  @check_voice = Resources::CheckVoice.new(http)
  @generate_persona = Resources::GeneratePersona.new(http)
  @boost_style = Resources::BoostStyle.new(http)
end

Instance Attribute Details

#add_instrumentalObject (readonly)

Returns the value of attribute add_instrumental.



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

def add_instrumental
  @add_instrumental
end

#add_vocalsObject (readonly)

Returns the value of attribute add_vocals.



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

def add_vocals
  @add_vocals
end

#boost_styleObject (readonly)

Returns the value of attribute boost_style.



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

def boost_style
  @boost_style
end

#check_voiceObject (readonly)

Returns the value of attribute check_voice.



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

def check_voice
  @check_voice
end

#convert_audioObject (readonly)

Returns the value of attribute convert_audio.



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

def convert_audio
  @convert_audio
end

#cover_audioObject (readonly)

Returns the value of attribute cover_audio.



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

def cover_audio
  @cover_audio
end

#create_mashupObject (readonly)

Returns the value of attribute create_mashup.



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

def create_mashup
  @create_mashup
end

#extend_musicObject (readonly)

Returns the value of attribute extend_music.



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

def extend_music
  @extend_music
end

#generate_artworkObject (readonly)

Returns the value of attribute generate_artwork.



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

def generate_artwork
  @generate_artwork
end

#generate_lyricsObject (readonly)

Returns the value of attribute generate_lyrics.



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

def generate_lyrics
  @generate_lyrics
end

#generate_midiObject (readonly)

Returns the value of attribute generate_midi.



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

def generate_midi
  @generate_midi
end

#generate_personaObject (readonly)

Returns the value of attribute generate_persona.



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

def generate_persona
  @generate_persona
end

#generate_voiceObject (readonly)

Returns the value of attribute generate_voice.



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

def generate_voice
  @generate_voice
end

#get_timestamped_lyricsObject (readonly)

Returns the value of attribute get_timestamped_lyrics.



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

def get_timestamped_lyrics
  @get_timestamped_lyrics
end

#regenerate_validation_phraseObject (readonly)

Returns the value of attribute regenerate_validation_phrase.



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

def regenerate_validation_phrase
  @regenerate_validation_phrase
end

#replace_sectionObject (readonly)

Returns the value of attribute replace_section.



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

def replace_section
  @replace_section
end

#separate_audio_stemsObject (readonly)

Returns the value of attribute separate_audio_stems.



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

def separate_audio_stems
  @separate_audio_stems
end

#text_to_musicObject (readonly)

Returns the value of attribute text_to_music.



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

def text_to_music
  @text_to_music
end

#text_to_soundObject (readonly)

Returns the value of attribute text_to_sound.



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

def text_to_sound
  @text_to_sound
end

#visualize_musicObject (readonly)

Returns the value of attribute visualize_music.



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

def visualize_music
  @visualize_music
end

#voice_to_validation_phraseObject (readonly)

Returns the value of attribute voice_to_validation_phrase.



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

def voice_to_validation_phrase
  @voice_to_validation_phrase
end