runapi-suno 0.2.7 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -7
- data/lib/runapi/suno/contract_gen.rb +756 -0
- data/lib/runapi/suno/resources/add_instrumental.rb +7 -7
- data/lib/runapi/suno/resources/add_vocals.rb +7 -7
- data/lib/runapi/suno/resources/boost_style.rb +2 -2
- data/lib/runapi/suno/resources/check_voice.rb +2 -2
- data/lib/runapi/suno/resources/convert_audio.rb +7 -7
- data/lib/runapi/suno/resources/cover_audio.rb +7 -7
- data/lib/runapi/suno/resources/create_mashup.rb +7 -7
- data/lib/runapi/suno/resources/extend_music.rb +7 -7
- data/lib/runapi/suno/resources/generate_artwork.rb +7 -7
- data/lib/runapi/suno/resources/generate_lyrics.rb +7 -7
- data/lib/runapi/suno/resources/generate_midi.rb +7 -7
- data/lib/runapi/suno/resources/generate_persona.rb +2 -2
- data/lib/runapi/suno/resources/generate_voice.rb +7 -7
- data/lib/runapi/suno/resources/get_timestamped_lyrics.rb +2 -2
- data/lib/runapi/suno/resources/regenerate_validation_phrase.rb +7 -7
- data/lib/runapi/suno/resources/replace_section.rb +7 -7
- data/lib/runapi/suno/resources/separate_audio_stems.rb +7 -7
- data/lib/runapi/suno/resources/text_to_music.rb +7 -7
- data/lib/runapi/suno/resources/text_to_sound.rb +7 -7
- data/lib/runapi/suno/resources/visualize_music.rb +7 -7
- data/lib/runapi/suno/resources/voice_to_validation_phrase.rb +7 -7
- data/lib/runapi/suno/types.rb +15 -1
- data/lib/runapi/suno/validators.rb +38 -47
- data/lib/runapi/suno.rb +1 -0
- metadata +11 -8
|
@@ -15,19 +15,19 @@ module RunApi
|
|
|
15
15
|
@http = http
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def run(**params)
|
|
19
|
-
task = create(**params)
|
|
20
|
-
poll_until_complete { get(task.id) }
|
|
18
|
+
def run(options: nil, **params)
|
|
19
|
+
task = create(options: options, **params)
|
|
20
|
+
poll_until_complete { get(task.id, options: options) }
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def create(**params)
|
|
23
|
+
def create(options: nil, **params)
|
|
24
24
|
params = compact_params(params)
|
|
25
25
|
validate_params!(params)
|
|
26
|
-
request(:post, ENDPOINT, body: params)
|
|
26
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def get(id)
|
|
30
|
-
request(:get, "#{ENDPOINT}/#{id}")
|
|
29
|
+
def get(id, options: nil)
|
|
30
|
+
request(:get, "#{ENDPOINT}/#{id}", options: options)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
private
|
|
@@ -15,19 +15,19 @@ module RunApi
|
|
|
15
15
|
@http = http
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def run(**params)
|
|
19
|
-
task = create(**params)
|
|
20
|
-
poll_until_complete { get(task.id) }
|
|
18
|
+
def run(options: nil, **params)
|
|
19
|
+
task = create(options: options, **params)
|
|
20
|
+
poll_until_complete { get(task.id, options: options) }
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def create(**params)
|
|
23
|
+
def create(options: nil, **params)
|
|
24
24
|
params = compact_params(params)
|
|
25
25
|
validate_params!(params)
|
|
26
|
-
request(:post, ENDPOINT, body: params)
|
|
26
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def get(id)
|
|
30
|
-
request(:get, "#{ENDPOINT}/#{id}")
|
|
29
|
+
def get(id, options: nil)
|
|
30
|
+
request(:get, "#{ENDPOINT}/#{id}", options: options)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
private
|
|
@@ -14,10 +14,10 @@ module RunApi
|
|
|
14
14
|
@http = http
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
def run(**params)
|
|
17
|
+
def run(options: nil, **params)
|
|
18
18
|
params = compact_params(params)
|
|
19
19
|
validate_params!(params)
|
|
20
|
-
request(:post, ENDPOINT, body: params)
|
|
20
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
private
|
|
@@ -14,10 +14,10 @@ module RunApi
|
|
|
14
14
|
@http = http
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
def run(**params)
|
|
17
|
+
def run(options: nil, **params)
|
|
18
18
|
params = compact_params(params)
|
|
19
19
|
validate_params!(params)
|
|
20
|
-
request(:post, ENDPOINT, body: params)
|
|
20
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
private
|
|
@@ -15,19 +15,19 @@ module RunApi
|
|
|
15
15
|
@http = http
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def run(**params)
|
|
19
|
-
task = create(**params)
|
|
20
|
-
poll_until_complete { get(task.id) }
|
|
18
|
+
def run(options: nil, **params)
|
|
19
|
+
task = create(options: options, **params)
|
|
20
|
+
poll_until_complete { get(task.id, options: options) }
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def create(**params)
|
|
23
|
+
def create(options: nil, **params)
|
|
24
24
|
params = compact_params(params)
|
|
25
25
|
validate_params!(params)
|
|
26
|
-
request(:post, ENDPOINT, body: params)
|
|
26
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def get(id)
|
|
30
|
-
request(:get, "#{ENDPOINT}/#{id}")
|
|
29
|
+
def get(id, options: nil)
|
|
30
|
+
request(:get, "#{ENDPOINT}/#{id}", options: options)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
private
|
|
@@ -15,19 +15,19 @@ module RunApi
|
|
|
15
15
|
@http = http
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def run(**params)
|
|
19
|
-
task = create(**params)
|
|
20
|
-
poll_until_complete { get(task.id) }
|
|
18
|
+
def run(options: nil, **params)
|
|
19
|
+
task = create(options: options, **params)
|
|
20
|
+
poll_until_complete { get(task.id, options: options) }
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def create(**params)
|
|
23
|
+
def create(options: nil, **params)
|
|
24
24
|
params = compact_params(params)
|
|
25
25
|
validate_params!(params)
|
|
26
|
-
request(:post, ENDPOINT, body: params)
|
|
26
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def get(id)
|
|
30
|
-
request(:get, "#{ENDPOINT}/#{id}")
|
|
29
|
+
def get(id, options: nil)
|
|
30
|
+
request(:get, "#{ENDPOINT}/#{id}", options: options)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
private
|
|
@@ -15,19 +15,19 @@ module RunApi
|
|
|
15
15
|
@http = http
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def run(**params)
|
|
19
|
-
task = create(**params)
|
|
20
|
-
poll_until_complete { get(task.id) }
|
|
18
|
+
def run(options: nil, **params)
|
|
19
|
+
task = create(options: options, **params)
|
|
20
|
+
poll_until_complete { get(task.id, options: options) }
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def create(**params)
|
|
23
|
+
def create(options: nil, **params)
|
|
24
24
|
params = compact_params(params)
|
|
25
25
|
validate_params!(params)
|
|
26
|
-
request(:post, ENDPOINT, body: params)
|
|
26
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def get(id)
|
|
30
|
-
request(:get, "#{ENDPOINT}/#{id}")
|
|
29
|
+
def get(id, options: nil)
|
|
30
|
+
request(:get, "#{ENDPOINT}/#{id}", options: options)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
private
|
|
@@ -15,19 +15,19 @@ module RunApi
|
|
|
15
15
|
@http = http
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def run(**params)
|
|
19
|
-
task = create(**params)
|
|
20
|
-
poll_until_complete { get(task.id) }
|
|
18
|
+
def run(options: nil, **params)
|
|
19
|
+
task = create(options: options, **params)
|
|
20
|
+
poll_until_complete { get(task.id, options: options) }
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def create(**params)
|
|
23
|
+
def create(options: nil, **params)
|
|
24
24
|
params = compact_params(params)
|
|
25
25
|
validate_params!(params)
|
|
26
|
-
request(:post, ENDPOINT, body: params)
|
|
26
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def get(id)
|
|
30
|
-
request(:get, "#{ENDPOINT}/#{id}")
|
|
29
|
+
def get(id, options: nil)
|
|
30
|
+
request(:get, "#{ENDPOINT}/#{id}", options: options)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
private
|
|
@@ -15,19 +15,19 @@ module RunApi
|
|
|
15
15
|
@http = http
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def run(**params)
|
|
19
|
-
task = create(**params)
|
|
20
|
-
poll_until_complete { get(task.id) }
|
|
18
|
+
def run(options: nil, **params)
|
|
19
|
+
task = create(options: options, **params)
|
|
20
|
+
poll_until_complete { get(task.id, options: options) }
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def create(**params)
|
|
23
|
+
def create(options: nil, **params)
|
|
24
24
|
params = compact_params(params)
|
|
25
25
|
validate_params!(params)
|
|
26
|
-
request(:post, ENDPOINT, body: params)
|
|
26
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def get(id)
|
|
30
|
-
request(:get, "#{ENDPOINT}/#{id}")
|
|
29
|
+
def get(id, options: nil)
|
|
30
|
+
request(:get, "#{ENDPOINT}/#{id}", options: options)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
private
|
|
@@ -15,19 +15,19 @@ module RunApi
|
|
|
15
15
|
@http = http
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def run(**params)
|
|
19
|
-
task = create(**params)
|
|
20
|
-
poll_until_complete { get(task.id) }
|
|
18
|
+
def run(options: nil, **params)
|
|
19
|
+
task = create(options: options, **params)
|
|
20
|
+
poll_until_complete { get(task.id, options: options) }
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def create(**params)
|
|
23
|
+
def create(options: nil, **params)
|
|
24
24
|
params = compact_params(params)
|
|
25
25
|
validate_params!(params)
|
|
26
|
-
request(:post, ENDPOINT, body: params)
|
|
26
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def get(id)
|
|
30
|
-
request(:get, "#{ENDPOINT}/#{id}")
|
|
29
|
+
def get(id, options: nil)
|
|
30
|
+
request(:get, "#{ENDPOINT}/#{id}", options: options)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
private
|
|
@@ -15,19 +15,19 @@ module RunApi
|
|
|
15
15
|
@http = http
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def run(**params)
|
|
19
|
-
task = create(**params)
|
|
20
|
-
poll_until_complete { get(task.id) }
|
|
18
|
+
def run(options: nil, **params)
|
|
19
|
+
task = create(options: options, **params)
|
|
20
|
+
poll_until_complete { get(task.id, options: options) }
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def create(**params)
|
|
23
|
+
def create(options: nil, **params)
|
|
24
24
|
params = compact_params(params)
|
|
25
25
|
validate_params!(params)
|
|
26
|
-
request(:post, ENDPOINT, body: params)
|
|
26
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def get(id)
|
|
30
|
-
request(:get, "#{ENDPOINT}/#{id}")
|
|
29
|
+
def get(id, options: nil)
|
|
30
|
+
request(:get, "#{ENDPOINT}/#{id}", options: options)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
private
|
|
@@ -14,10 +14,10 @@ module RunApi
|
|
|
14
14
|
@http = http
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
def run(**params)
|
|
17
|
+
def run(options: nil, **params)
|
|
18
18
|
params = compact_params(params)
|
|
19
19
|
validate_params!(params)
|
|
20
|
-
request(:post, ENDPOINT, body: params)
|
|
20
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
private
|
|
@@ -15,19 +15,19 @@ module RunApi
|
|
|
15
15
|
@http = http
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def run(**params)
|
|
19
|
-
task = create(**params)
|
|
20
|
-
poll_until_complete { get(task.id) }
|
|
18
|
+
def run(options: nil, **params)
|
|
19
|
+
task = create(options: options, **params)
|
|
20
|
+
poll_until_complete { get(task.id, options: options) }
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def create(**params)
|
|
23
|
+
def create(options: nil, **params)
|
|
24
24
|
params = compact_params(params)
|
|
25
25
|
validate_params!(params)
|
|
26
|
-
request(:post, ENDPOINT, body: params)
|
|
26
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def get(id)
|
|
30
|
-
request(:get, "#{ENDPOINT}/#{id}")
|
|
29
|
+
def get(id, options: nil)
|
|
30
|
+
request(:get, "#{ENDPOINT}/#{id}", options: options)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
private
|
|
@@ -14,10 +14,10 @@ module RunApi
|
|
|
14
14
|
@http = http
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
def run(**params)
|
|
17
|
+
def run(options: nil, **params)
|
|
18
18
|
params = compact_params(params)
|
|
19
19
|
validate_params!(params)
|
|
20
|
-
request(:post, ENDPOINT, body: params)
|
|
20
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
private
|
|
@@ -15,19 +15,19 @@ module RunApi
|
|
|
15
15
|
@http = http
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def run(**params)
|
|
19
|
-
task = create(**params)
|
|
20
|
-
poll_until_complete { get(task.id) }
|
|
18
|
+
def run(options: nil, **params)
|
|
19
|
+
task = create(options: options, **params)
|
|
20
|
+
poll_until_complete { get(task.id, options: options) }
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def create(**params)
|
|
23
|
+
def create(options: nil, **params)
|
|
24
24
|
params = compact_params(params)
|
|
25
25
|
validate_params!(params)
|
|
26
|
-
request(:post, ENDPOINT, body: params)
|
|
26
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def get(id)
|
|
30
|
-
request(:get, "#{ENDPOINT}/#{id}")
|
|
29
|
+
def get(id, options: nil)
|
|
30
|
+
request(:get, "#{ENDPOINT}/#{id}", options: options)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
private
|
|
@@ -15,19 +15,19 @@ module RunApi
|
|
|
15
15
|
@http = http
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def run(**params)
|
|
19
|
-
task = create(**params)
|
|
20
|
-
poll_until_complete { get(task.id) }
|
|
18
|
+
def run(options: nil, **params)
|
|
19
|
+
task = create(options: options, **params)
|
|
20
|
+
poll_until_complete { get(task.id, options: options) }
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def create(**params)
|
|
23
|
+
def create(options: nil, **params)
|
|
24
24
|
params = compact_params(params)
|
|
25
25
|
validate_params!(params)
|
|
26
|
-
request(:post, ENDPOINT, body: params)
|
|
26
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def get(id)
|
|
30
|
-
request(:get, "#{ENDPOINT}/#{id}")
|
|
29
|
+
def get(id, options: nil)
|
|
30
|
+
request(:get, "#{ENDPOINT}/#{id}", options: options)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
private
|
|
@@ -15,19 +15,19 @@ module RunApi
|
|
|
15
15
|
@http = http
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def run(**params)
|
|
19
|
-
task = create(**params)
|
|
20
|
-
poll_until_complete { get(task.id) }
|
|
18
|
+
def run(options: nil, **params)
|
|
19
|
+
task = create(options: options, **params)
|
|
20
|
+
poll_until_complete { get(task.id, options: options) }
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def create(**params)
|
|
23
|
+
def create(options: nil, **params)
|
|
24
24
|
params = compact_params(params)
|
|
25
25
|
validate_params!(params)
|
|
26
|
-
request(:post, ENDPOINT, body: params)
|
|
26
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def get(id)
|
|
30
|
-
request(:get, "#{ENDPOINT}/#{id}")
|
|
29
|
+
def get(id, options: nil)
|
|
30
|
+
request(:get, "#{ENDPOINT}/#{id}", options: options)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
private
|
|
@@ -15,19 +15,19 @@ module RunApi
|
|
|
15
15
|
@http = http
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def run(**params)
|
|
19
|
-
task = create(**params)
|
|
20
|
-
poll_until_complete { get(task.id) }
|
|
18
|
+
def run(options: nil, **params)
|
|
19
|
+
task = create(options: options, **params)
|
|
20
|
+
poll_until_complete { get(task.id, options: options) }
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def create(**params)
|
|
23
|
+
def create(options: nil, **params)
|
|
24
24
|
params = compact_params(params)
|
|
25
25
|
validate_params!(params)
|
|
26
|
-
request(:post, ENDPOINT, body: params)
|
|
26
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def get(id)
|
|
30
|
-
request(:get, "#{ENDPOINT}/#{id}")
|
|
29
|
+
def get(id, options: nil)
|
|
30
|
+
request(:get, "#{ENDPOINT}/#{id}", options: options)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
private
|
|
@@ -15,19 +15,19 @@ module RunApi
|
|
|
15
15
|
@http = http
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def run(**params)
|
|
19
|
-
task = create(**params)
|
|
20
|
-
poll_until_complete { get(task.id) }
|
|
18
|
+
def run(options: nil, **params)
|
|
19
|
+
task = create(options: options, **params)
|
|
20
|
+
poll_until_complete { get(task.id, options: options) }
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def create(**params)
|
|
23
|
+
def create(options: nil, **params)
|
|
24
24
|
params = compact_params(params)
|
|
25
25
|
validate_params!(params)
|
|
26
|
-
request(:post, ENDPOINT, body: params)
|
|
26
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def get(id)
|
|
30
|
-
request(:get, "#{ENDPOINT}/#{id}")
|
|
29
|
+
def get(id, options: nil)
|
|
30
|
+
request(:get, "#{ENDPOINT}/#{id}", options: options)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
private
|
|
@@ -15,19 +15,19 @@ module RunApi
|
|
|
15
15
|
@http = http
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def run(**params)
|
|
19
|
-
task = create(**params)
|
|
20
|
-
poll_until_complete { get(task.id) }
|
|
18
|
+
def run(options: nil, **params)
|
|
19
|
+
task = create(options: options, **params)
|
|
20
|
+
poll_until_complete { get(task.id, options: options) }
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def create(**params)
|
|
23
|
+
def create(options: nil, **params)
|
|
24
24
|
params = compact_params(params)
|
|
25
25
|
validate_params!(params)
|
|
26
|
-
request(:post, ENDPOINT, body: params)
|
|
26
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def get(id)
|
|
30
|
-
request(:get, "#{ENDPOINT}/#{id}")
|
|
29
|
+
def get(id, options: nil)
|
|
30
|
+
request(:get, "#{ENDPOINT}/#{id}", options: options)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
private
|
|
@@ -15,19 +15,19 @@ module RunApi
|
|
|
15
15
|
@http = http
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def run(**params)
|
|
19
|
-
task = create(**params)
|
|
20
|
-
poll_until_complete { get(task.id) }
|
|
18
|
+
def run(options: nil, **params)
|
|
19
|
+
task = create(options: options, **params)
|
|
20
|
+
poll_until_complete { get(task.id, options: options) }
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def create(**params)
|
|
23
|
+
def create(options: nil, **params)
|
|
24
24
|
params = compact_params(params)
|
|
25
25
|
validate_params!(params)
|
|
26
|
-
request(:post, ENDPOINT, body: params)
|
|
26
|
+
request(:post, ENDPOINT, body: params, options: options)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def get(id)
|
|
30
|
-
request(:get, "#{ENDPOINT}/#{id}")
|
|
29
|
+
def get(id, options: nil)
|
|
30
|
+
request(:get, "#{ENDPOINT}/#{id}", options: options)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
private
|
data/lib/runapi/suno/types.rb
CHANGED
|
@@ -21,7 +21,6 @@ module RunApi
|
|
|
21
21
|
# auto_lyrics: generates from prompt; exact_lyrics: sings literal lyrics; instrumental: no vocals.
|
|
22
22
|
VOCAL_MODES = %w[auto_lyrics exact_lyrics instrumental].freeze
|
|
23
23
|
# separate_vocal: isolates vocals+instrumental; split_stem: splits into all individual instruments.
|
|
24
|
-
SEPARATE_AUDIO_STEMS_TYPES = %w[separate_vocal split_stem].freeze
|
|
25
24
|
# Language for the voice-cloning validation phrase the user must read back.
|
|
26
25
|
VALIDATION_PHRASE_LANGUAGES = %w[en zh es fr pt de ja ko hi ru].freeze
|
|
27
26
|
# Singing ability of the voice being cloned; calibrates model expectations.
|
|
@@ -67,6 +66,20 @@ module RunApi
|
|
|
67
66
|
required :palign, Numeric
|
|
68
67
|
end
|
|
69
68
|
|
|
69
|
+
# One audio result in an advanced stem extraction pair.
|
|
70
|
+
class AdvancedStemAudio < RunApi::Core::BaseModel
|
|
71
|
+
required :id, String
|
|
72
|
+
required :duration_seconds, Numeric
|
|
73
|
+
required :audio_url, String
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Extracted target stem and the remaining audio after removing it.
|
|
77
|
+
class AdvancedStemPair < RunApi::Core::BaseModel
|
|
78
|
+
required :stem_name, String
|
|
79
|
+
required :extracted_audio, -> { AdvancedStemAudio }
|
|
80
|
+
required :remaining_audio, -> { AdvancedStemAudio }
|
|
81
|
+
end
|
|
82
|
+
|
|
70
83
|
# URLs for each isolated instrument stem after separation. Only populated stems have URLs.
|
|
71
84
|
class SeparatedAudio < RunApi::Core::BaseModel
|
|
72
85
|
optional :vocal_url, String
|
|
@@ -83,6 +96,7 @@ module RunApi
|
|
|
83
96
|
optional :strings_url, String
|
|
84
97
|
optional :synth_url, String
|
|
85
98
|
optional :woodwinds_url, String
|
|
99
|
+
optional :pairs, [-> { AdvancedStemPair }]
|
|
86
100
|
end
|
|
87
101
|
|
|
88
102
|
# A single MIDI note event within an instrument track.
|