Class: RunApi::Suno::Client
- Inherits:
-
Core::Client
- Object
- Core::Client
- RunApi::Suno::Client
- Defined in:
- lib/runapi/suno/client.rb
Overview
Suno music platform client covering song generation, extension, covers, stems, MIDI, lyrics, mashups, sound effects, visualization, personas, and voice cloning.
Instance Attribute Summary collapse
-
#add_instrumental ⇒ Resources::AddInstrumental
readonly
Generates and adds an instrumental backing track to uploaded audio.
-
#add_samples ⇒ Object
readonly
Returns the value of attribute add_samples.
-
#add_vocals ⇒ Resources::AddVocals
readonly
Generates and adds vocals to an uploaded instrumental track.
-
#blend_lyrics ⇒ Resources::BlendLyrics
readonly
Blends two caller-authored lyrics texts.
-
#boost_style ⇒ Resources::BoostStyle
readonly
Generates style/genre tags from a text description (synchronous).
-
#check_voice ⇒ Resources::CheckVoice
readonly
Step 4 of voice cloning: checks whether a custom voice is ready (synchronous).
-
#convert_audio ⇒ Resources::ConvertAudio
readonly
Converts a generated track to WAV format.
-
#cover_audio ⇒ Resources::CoverAudio
readonly
Re-records vocals over an uploaded audio file with a new style or voice.
-
#create_mashup ⇒ Resources::CreateMashup
readonly
Blends two audio tracks into a single new composition.
-
#extend_music ⇒ Resources::ExtendMusic
readonly
Continues an existing track from a specified timestamp.
-
#generate_artwork ⇒ Resources::GenerateArtwork
readonly
Creates cover artwork for an existing music task.
-
#generate_lyrics ⇒ Resources::GenerateLyrics
readonly
Produces AI-generated lyrics from a text prompt.
-
#generate_midi ⇒ Resources::GenerateMidi
readonly
Extracts per-instrument MIDI note data from a generated track.
-
#generate_persona ⇒ Resources::GeneratePersona
readonly
Creates a reusable style or voice persona from a track's vocals (synchronous).
-
#generate_voice ⇒ Resources::GenerateVoice
readonly
Step 3 of voice cloning: trains a custom voice.
-
#get_timestamped_lyrics ⇒ Resources::GetTimestampedLyrics
readonly
Retrieves word-level timing alignment for a track (synchronous).
-
#regenerate_validation_phrase ⇒ Resources::RegenerateValidationPhrase
readonly
Step 2 (optional) of voice cloning: requests a new phrase.
-
#remaster_audio ⇒ Object
readonly
Returns the value of attribute remaster_audio.
-
#replace_section ⇒ Resources::ReplaceSection
readonly
Re-generates a time range within an existing track.
-
#separate_audio_stems ⇒ Resources::SeparateAudioStems
readonly
Splits a track into individual instrument stems.
-
#stitch_audio ⇒ Object
readonly
Returns the value of attribute stitch_audio.
-
#text_to_music ⇒ Resources::TextToMusic
readonly
Generates songs from a text prompt with configurable vocal mode, style, and persona.
-
#text_to_sound ⇒ Resources::TextToSound
readonly
Generates sound effects from a text description.
-
#visualize_music ⇒ Resources::VisualizeMusic
readonly
Generates a music visualization video from an existing track.
-
#voice_to_validation_phrase ⇒ Resources::VoiceToValidationPhrase
readonly
Step 1 of voice cloning: extracts a validation phrase.
Instance Method Summary collapse
-
#initialize(api_key: nil, **options) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(api_key: nil, **options) ⇒ Client
Returns a new instance of Client.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/runapi/suno/client.rb', line 61 def initialize(api_key: nil, **) super @text_to_music = Resources::TextToMusic.new(http) @extend_music = Resources::ExtendMusic.new(http) @stitch_audio = Resources::StitchAudio.new(http) @remaster_audio = Resources::RemasterAudio.new(http) @add_samples = Resources::AddSamples.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) @blend_lyrics = Resources::BlendLyrics.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_instrumental ⇒ Resources::AddInstrumental (readonly)
Returns generates and adds an instrumental backing track to uploaded audio.
25 26 27 |
# File 'lib/runapi/suno/client.rb', line 25 def add_instrumental @add_instrumental end |
#add_samples ⇒ Object (readonly)
Returns the value of attribute add_samples.
19 20 21 |
# File 'lib/runapi/suno/client.rb', line 19 def add_samples @add_samples end |
#add_vocals ⇒ Resources::AddVocals (readonly)
Returns generates and adds vocals to an uploaded instrumental track.
27 28 29 |
# File 'lib/runapi/suno/client.rb', line 27 def add_vocals @add_vocals end |
#blend_lyrics ⇒ Resources::BlendLyrics (readonly)
Returns blends two caller-authored lyrics texts.
39 40 41 |
# File 'lib/runapi/suno/client.rb', line 39 def blend_lyrics @blend_lyrics end |
#boost_style ⇒ Resources::BoostStyle (readonly)
Returns generates style/genre tags from a text description (synchronous).
59 60 61 |
# File 'lib/runapi/suno/client.rb', line 59 def boost_style @boost_style end |
#check_voice ⇒ Resources::CheckVoice (readonly)
Returns step 4 of voice cloning: checks whether a custom voice is ready (synchronous).
55 56 57 |
# File 'lib/runapi/suno/client.rb', line 55 def check_voice @check_voice end |
#convert_audio ⇒ Resources::ConvertAudio (readonly)
Returns converts a generated track to WAV format.
33 34 35 |
# File 'lib/runapi/suno/client.rb', line 33 def convert_audio @convert_audio end |
#cover_audio ⇒ Resources::CoverAudio (readonly)
Returns re-records vocals over an uploaded audio file with a new style or voice.
23 24 25 |
# File 'lib/runapi/suno/client.rb', line 23 def cover_audio @cover_audio end |
#create_mashup ⇒ Resources::CreateMashup (readonly)
Returns blends two audio tracks into a single new composition.
45 46 47 |
# File 'lib/runapi/suno/client.rb', line 45 def create_mashup @create_mashup end |
#extend_music ⇒ Resources::ExtendMusic (readonly)
Returns continues an existing track from a specified timestamp.
18 19 20 |
# File 'lib/runapi/suno/client.rb', line 18 def extend_music @extend_music end |
#generate_artwork ⇒ Resources::GenerateArtwork (readonly)
Returns creates cover artwork for an existing music task.
21 22 23 |
# File 'lib/runapi/suno/client.rb', line 21 def generate_artwork @generate_artwork end |
#generate_lyrics ⇒ Resources::GenerateLyrics (readonly)
Returns produces AI-generated lyrics from a text prompt.
37 38 39 |
# File 'lib/runapi/suno/client.rb', line 37 def generate_lyrics @generate_lyrics end |
#generate_midi ⇒ Resources::GenerateMidi (readonly)
Returns extracts per-instrument MIDI note data from a generated track.
31 32 33 |
# File 'lib/runapi/suno/client.rb', line 31 def generate_midi @generate_midi end |
#generate_persona ⇒ Resources::GeneratePersona (readonly)
Returns creates a reusable style or voice persona from a track's vocals (synchronous).
57 58 59 |
# File 'lib/runapi/suno/client.rb', line 57 def generate_persona @generate_persona end |
#generate_voice ⇒ Resources::GenerateVoice (readonly)
Returns step 3 of voice cloning: trains a custom voice.
53 54 55 |
# File 'lib/runapi/suno/client.rb', line 53 def generate_voice @generate_voice end |
#get_timestamped_lyrics ⇒ Resources::GetTimestampedLyrics (readonly)
Returns retrieves word-level timing alignment for a track (synchronous).
41 42 43 |
# File 'lib/runapi/suno/client.rb', line 41 def @get_timestamped_lyrics end |
#regenerate_validation_phrase ⇒ Resources::RegenerateValidationPhrase (readonly)
Returns step 2 (optional) of voice cloning: requests a new phrase.
51 52 53 |
# File 'lib/runapi/suno/client.rb', line 51 def regenerate_validation_phrase @regenerate_validation_phrase end |
#remaster_audio ⇒ Object (readonly)
Returns the value of attribute remaster_audio.
19 20 21 |
# File 'lib/runapi/suno/client.rb', line 19 def remaster_audio @remaster_audio end |
#replace_section ⇒ Resources::ReplaceSection (readonly)
Returns re-generates a time range within an existing track.
43 44 45 |
# File 'lib/runapi/suno/client.rb', line 43 def replace_section @replace_section end |
#separate_audio_stems ⇒ Resources::SeparateAudioStems (readonly)
Returns splits a track into individual instrument stems.
29 30 31 |
# File 'lib/runapi/suno/client.rb', line 29 def separate_audio_stems @separate_audio_stems end |
#stitch_audio ⇒ Object (readonly)
Returns the value of attribute stitch_audio.
19 20 21 |
# File 'lib/runapi/suno/client.rb', line 19 def stitch_audio @stitch_audio end |
#text_to_music ⇒ Resources::TextToMusic (readonly)
Returns generates songs from a text prompt with configurable vocal mode, style, and persona.
16 17 18 |
# File 'lib/runapi/suno/client.rb', line 16 def text_to_music @text_to_music end |
#text_to_sound ⇒ Resources::TextToSound (readonly)
Returns generates sound effects from a text description.
47 48 49 |
# File 'lib/runapi/suno/client.rb', line 47 def text_to_sound @text_to_sound end |
#visualize_music ⇒ Resources::VisualizeMusic (readonly)
Returns generates a music visualization video from an existing track.
35 36 37 |
# File 'lib/runapi/suno/client.rb', line 35 def visualize_music @visualize_music end |
#voice_to_validation_phrase ⇒ Resources::VoiceToValidationPhrase (readonly)
Returns step 1 of voice cloning: extracts a validation phrase.
49 50 51 |
# File 'lib/runapi/suno/client.rb', line 49 def voice_to_validation_phrase @voice_to_validation_phrase end |