runapi-suno 0.2.8 → 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/lib/runapi/suno/contract_gen.rb +13 -1
- data/lib/runapi/suno/types.rb +15 -1
- data/lib/runapi/suno/validators.rb +1 -2
- 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: f259ccc84f8f3054aa71d41ea715115b7609e1c1409160caa09e67e25a39636d
|
|
4
|
+
data.tar.gz: 5957bae80c3e6f7199af8cbe46aae633cf3844b4b85c6e931f0bf16cd7cfc685
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 855144d9889261c9ac7a4fe39063f743e1750e4fef940ce4c3369f919b322fa6f706e35fa4b19cd8797dff45df6c50008cc6d75601f3404619acced5ac8abd95
|
|
7
|
+
data.tar.gz: 9ea8a4f84ffc277e4cd94b6a5ee20f5bafdbf39b6562869f70f13c88ea63d44d6917789122273af17b9394ff58118d930875a6ce00207be2fc8fbb7f97285ab8
|
|
@@ -544,11 +544,23 @@ module RunApi
|
|
|
544
544
|
"audio_id" => {
|
|
545
545
|
"required" => true
|
|
546
546
|
},
|
|
547
|
+
"stem_name" => {
|
|
548
|
+
"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"]
|
|
549
|
+
},
|
|
547
550
|
"task_id" => {
|
|
548
551
|
"required" => true
|
|
552
|
+
},
|
|
553
|
+
"type" => {
|
|
554
|
+
"enum" => ["separate_vocal", "split_stem", "split_stem_advanced"]
|
|
549
555
|
}
|
|
550
556
|
}
|
|
551
|
-
}
|
|
557
|
+
},
|
|
558
|
+
"rules" => [{
|
|
559
|
+
"when" => {
|
|
560
|
+
"type" => "split_stem_advanced"
|
|
561
|
+
},
|
|
562
|
+
"required" => ["stem_name"]
|
|
563
|
+
}]
|
|
552
564
|
},
|
|
553
565
|
"text-to-music" => {
|
|
554
566
|
"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)
|
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.9
|
|
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.13
|
|
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.13
|
|
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
|