runapi-suno 0.2.8 → 0.2.10
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/lib/runapi/suno/contract_gen.rb +31 -7
- data/lib/runapi/suno/types.rb +15 -1
- data/lib/runapi/suno/validators.rb +1 -6
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e778eebc0d01b454f8a2187126173625cd0c14925a2e238eef0a1015e8ff6a0c
|
|
4
|
+
data.tar.gz: 404e68c9d3e9673d9ac80d393d6cebea8a4482e055f3b37de6f3961919712690
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9a7ac2a46590a7869002485d2a8fb9e27bea5866a480ae3d70fbf3cf0bc6367d13cb5801fd12a30d86feeed15fd3fb0ffc06361f2fea59f9e96cbbb6398e2356
|
|
7
|
+
data.tar.gz: 3dedafb65dada78f0c75ec572778813477fa44c24ab314de55f278c58dc0aa2fed613e26efc3834b5a273592398ec01c36eaea6bbef5a9d0eff02353d57fb097
|
|
@@ -239,7 +239,9 @@ module RunApi
|
|
|
239
239
|
"enum" => ["style", "voice"]
|
|
240
240
|
},
|
|
241
241
|
"upload_url_list" => {
|
|
242
|
-
"required" => true
|
|
242
|
+
"required" => true,
|
|
243
|
+
"min_items" => 2,
|
|
244
|
+
"max_items" => 2
|
|
243
245
|
},
|
|
244
246
|
"vocal_gender" => {
|
|
245
247
|
"enum" => ["male", "female"]
|
|
@@ -257,7 +259,9 @@ module RunApi
|
|
|
257
259
|
"enum" => ["style", "voice"]
|
|
258
260
|
},
|
|
259
261
|
"upload_url_list" => {
|
|
260
|
-
"required" => true
|
|
262
|
+
"required" => true,
|
|
263
|
+
"min_items" => 2,
|
|
264
|
+
"max_items" => 2
|
|
261
265
|
},
|
|
262
266
|
"vocal_gender" => {
|
|
263
267
|
"enum" => ["male", "female"]
|
|
@@ -275,7 +279,9 @@ module RunApi
|
|
|
275
279
|
"enum" => ["style", "voice"]
|
|
276
280
|
},
|
|
277
281
|
"upload_url_list" => {
|
|
278
|
-
"required" => true
|
|
282
|
+
"required" => true,
|
|
283
|
+
"min_items" => 2,
|
|
284
|
+
"max_items" => 2
|
|
279
285
|
},
|
|
280
286
|
"vocal_gender" => {
|
|
281
287
|
"enum" => ["male", "female"]
|
|
@@ -293,7 +299,9 @@ module RunApi
|
|
|
293
299
|
"enum" => ["style", "voice"]
|
|
294
300
|
},
|
|
295
301
|
"upload_url_list" => {
|
|
296
|
-
"required" => true
|
|
302
|
+
"required" => true,
|
|
303
|
+
"min_items" => 2,
|
|
304
|
+
"max_items" => 2
|
|
297
305
|
},
|
|
298
306
|
"vocal_gender" => {
|
|
299
307
|
"enum" => ["male", "female"]
|
|
@@ -311,7 +319,9 @@ module RunApi
|
|
|
311
319
|
"enum" => ["style", "voice"]
|
|
312
320
|
},
|
|
313
321
|
"upload_url_list" => {
|
|
314
|
-
"required" => true
|
|
322
|
+
"required" => true,
|
|
323
|
+
"min_items" => 2,
|
|
324
|
+
"max_items" => 2
|
|
315
325
|
},
|
|
316
326
|
"vocal_gender" => {
|
|
317
327
|
"enum" => ["male", "female"]
|
|
@@ -329,7 +339,9 @@ module RunApi
|
|
|
329
339
|
"enum" => ["style", "voice"]
|
|
330
340
|
},
|
|
331
341
|
"upload_url_list" => {
|
|
332
|
-
"required" => true
|
|
342
|
+
"required" => true,
|
|
343
|
+
"min_items" => 2,
|
|
344
|
+
"max_items" => 2
|
|
333
345
|
},
|
|
334
346
|
"vocal_gender" => {
|
|
335
347
|
"enum" => ["male", "female"]
|
|
@@ -544,11 +556,23 @@ module RunApi
|
|
|
544
556
|
"audio_id" => {
|
|
545
557
|
"required" => true
|
|
546
558
|
},
|
|
559
|
+
"stem_name" => {
|
|
560
|
+
"enum" => ["Lead Vocal", "Drum Kit", "Kick", "Snare", "Risers", "Bass", "Backing Vocals", "Piano", "Electric Guitar", "Percussion", "String Section", "Synth", "Acoustic Guitar", "Sound Effects", "Synth Pad", "Synth Bass", "Guitar", "Brass Section", "Organ", "Electronic Drum Kit", "Lead Electric Guitar", "Synth Keys", "Rhythm Electric Guitar", "Electric Piano", "Upright Bass", "Keyboards", "Distorted Electric Guitar", "Synth Strings", "Synth Lead", "Woodwinds", "Rhythm Acoustic Guitar", "Flute", "Harp", "Tambourine", "Trumpet", "Arpeggiator", "Accordion", "Fiddle", "Pedal Steel Guitar", "Synth Voice", "Violin", "Digital Piano", "Synth Brass", "Mandolin", "Choir", "Banjo", "Bells", "Clarinet", "Tenor Saxophone", "Trombone", "Shaker", "French Horn", "Glockenspiel", "Electric Bass", "Cello", "Timpani", "Harmonica", "Marimba", "Vibraphone", "Lap Steel Guitar", "Saxophone", "Orchestra", "Horns", "Cymbals", "Hand Clap", "Oboe", "Celesta", "Congas", "Drone", "Alto Saxophone", "Double Bass", "Ukulele", "Harpsichord", "Baritone Saxophone", "Xylophone", "Tuba", "Bass Guitar", "Whistle", "Lead Guitar", "Rhodes", "808", "Bongos", "Bassoon", "Cowbell", "Viola", "Sitar", "Steel Drums", "Piccolo", "Theremin", "Bagpipes", "Hi-Hat", "Music Box", "Melodica", "Tabla", "Koto", "Djembe", "Taiko", "Didgeridoo"]
|
|
561
|
+
},
|
|
547
562
|
"task_id" => {
|
|
548
563
|
"required" => true
|
|
564
|
+
},
|
|
565
|
+
"type" => {
|
|
566
|
+
"enum" => ["separate_vocal", "split_stem", "split_stem_advanced"]
|
|
549
567
|
}
|
|
550
568
|
}
|
|
551
|
-
}
|
|
569
|
+
},
|
|
570
|
+
"rules" => [{
|
|
571
|
+
"when" => {
|
|
572
|
+
"type" => "split_stem_advanced"
|
|
573
|
+
},
|
|
574
|
+
"required" => ["stem_name"]
|
|
575
|
+
}]
|
|
552
576
|
},
|
|
553
577
|
"text-to-music" => {
|
|
554
578
|
"models" => ["suno-v4", "suno-v4.5", "suno-v4.5-all", "suno-v4.5-plus", "suno-v5", "suno-v5.5"],
|
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.
|
|
@@ -49,8 +49,7 @@ module RunApi
|
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
def validate_separate_audio_stems!(params, resource)
|
|
52
|
-
|
|
53
|
-
validate_optional!(resource, params, :type, Types::SEPARATE_AUDIO_STEMS_TYPES)
|
|
52
|
+
resource.send(:validate_contract!, CONTRACT["separate-audio-stems"], params)
|
|
54
53
|
end
|
|
55
54
|
|
|
56
55
|
def validate_generate_midi!(params, resource)
|
|
@@ -89,10 +88,6 @@ module RunApi
|
|
|
89
88
|
end
|
|
90
89
|
|
|
91
90
|
def validate_create_mashup!(params, resource)
|
|
92
|
-
upload_url_list = param(resource, params, :upload_url_list)
|
|
93
|
-
unless upload_url_list.is_a?(Array) && upload_url_list.size == 2
|
|
94
|
-
raise Core::ValidationError, "upload_url_list must contain exactly 2 URLs"
|
|
95
|
-
end
|
|
96
91
|
resource.send(:validate_contract!, CONTRACT["create-mashup"], params)
|
|
97
92
|
end
|
|
98
93
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: runapi-suno
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- RunAPI
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.2.
|
|
18
|
+
version: 0.2.14
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.2.
|
|
25
|
+
version: 0.2.14
|
|
26
26
|
description: The Suno Ruby SDK is the language-specific package for Suno on RunAPI.
|
|
27
27
|
Use this package for song generation, lyrics, vocals, extension, and audio transformation
|
|
28
28
|
workflows when your application needs request bodies, task status lookup, and consistent
|