runapi-suno 0.5.1 → 0.7.0
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 +1 -1
- data/lib/runapi/suno/client.rb +4 -1
- data/lib/runapi/suno/resources/add_instrumental.rb +0 -7
- data/lib/runapi/suno/resources/add_samples.rb +0 -4
- data/lib/runapi/suno/resources/add_vocals.rb +0 -7
- data/lib/runapi/suno/resources/audio_action.rb +0 -1
- data/lib/runapi/suno/resources/audio_exports.rb +0 -7
- data/lib/runapi/suno/resources/blend_lyrics.rb +0 -1
- data/lib/runapi/suno/resources/boost_style.rb +0 -7
- data/lib/runapi/suno/resources/check_voice.rb +0 -7
- data/lib/runapi/suno/resources/convert_audio.rb +0 -7
- data/lib/runapi/suno/resources/cover_audio.rb +0 -7
- data/lib/runapi/suno/resources/create_mashup.rb +0 -7
- data/lib/runapi/suno/resources/extend_music.rb +0 -7
- data/lib/runapi/suno/resources/generate_artwork.rb +0 -7
- data/lib/runapi/suno/resources/generate_lyrics.rb +0 -7
- data/lib/runapi/suno/resources/generate_midi.rb +0 -7
- data/lib/runapi/suno/resources/generate_persona.rb +0 -7
- data/lib/runapi/suno/resources/generate_voice.rb +0 -7
- data/lib/runapi/suno/resources/get_timestamped_lyrics.rb +0 -7
- data/lib/runapi/suno/resources/music_from_sample.rb +0 -7
- data/lib/runapi/suno/resources/music_visualizations.rb +0 -7
- data/lib/runapi/suno/resources/personas.rb +0 -9
- data/lib/runapi/suno/resources/regenerate_validation_phrase.rb +0 -7
- data/lib/runapi/suno/resources/replace_section.rb +0 -7
- data/lib/runapi/suno/resources/separate_audio_stems.rb +0 -7
- data/lib/runapi/suno/resources/style_expansions.rb +0 -7
- data/lib/runapi/suno/resources/text_to_music.rb +0 -7
- data/lib/runapi/suno/resources/text_to_sound.rb +0 -7
- data/lib/runapi/suno/resources/text_to_speech.rb +34 -0
- data/lib/runapi/suno/resources/timestamped_lyrics.rb +0 -7
- data/lib/runapi/suno/resources/visualize_music.rb +0 -7
- data/lib/runapi/suno/resources/voice_to_validation_phrase.rb +0 -7
- data/lib/runapi/suno/resources/voices.rb +0 -7
- data/lib/runapi/suno/types/completed_responses.rb +4 -0
- data/lib/runapi/suno/types.rb +8 -3
- data/lib/runapi/suno.rb +1 -2
- metadata +4 -5
- data/lib/runapi/suno/contract_gen.rb +0 -2797
- data/lib/runapi/suno/validators.rb +0 -232
|
@@ -21,7 +21,6 @@ module RunApi
|
|
|
21
21
|
|
|
22
22
|
def run(options: nil, **params)
|
|
23
23
|
params = compact_params(params)
|
|
24
|
-
validate_params!(params)
|
|
25
24
|
request(:post, ENDPOINT, body: params, options: options)
|
|
26
25
|
end
|
|
27
26
|
|
|
@@ -29,12 +28,6 @@ module RunApi
|
|
|
29
28
|
def get(id, options: nil)
|
|
30
29
|
request(:get, "#{ENDPOINT}/#{id}", options: options, response_class: RESOURCE_RESPONSE_CLASS)
|
|
31
30
|
end
|
|
32
|
-
|
|
33
|
-
private
|
|
34
|
-
|
|
35
|
-
def validate_params!(params)
|
|
36
|
-
Validators.validate_voices!(params, self)
|
|
37
|
-
end
|
|
38
31
|
end
|
|
39
32
|
end
|
|
40
33
|
end
|
|
@@ -59,6 +59,10 @@ module RunApi
|
|
|
59
59
|
required :audios, [-> { Audio }]
|
|
60
60
|
end
|
|
61
61
|
|
|
62
|
+
class CompletedTextToSpeechResponse < TextToSpeechResponse
|
|
63
|
+
required :audios, [-> { Audio }]
|
|
64
|
+
end
|
|
65
|
+
|
|
62
66
|
class CompletedTextToSoundResponse < TextToSoundResponse
|
|
63
67
|
required :audios, [-> { SoundAudio }]
|
|
64
68
|
end
|
data/lib/runapi/suno/types.rb
CHANGED
|
@@ -4,10 +4,10 @@ module RunApi
|
|
|
4
4
|
module Suno
|
|
5
5
|
# Suno type definitions, response models, and enum constants.
|
|
6
6
|
module Types
|
|
7
|
-
# Suno music generation engine versions
|
|
8
|
-
MODELS = %w[suno-v6 suno-v6-wild suno-v6-mini
|
|
7
|
+
# Suno music generation engine versions (V6 family).
|
|
8
|
+
MODELS = %w[suno-v6 suno-v6-wild suno-v6-mini].freeze
|
|
9
9
|
# Model versions that support sound effect generation (subset of MODELS).
|
|
10
|
-
SOUND_MODELS = %w[suno-
|
|
10
|
+
SOUND_MODELS = %w[suno-v6].freeze
|
|
11
11
|
# Musical keys (major and minor) for sound effect generation.
|
|
12
12
|
SOUND_KEYS = %w[
|
|
13
13
|
Cm C#m Dm D#m Em Fm F#m Gm G#m Am A#m Bm
|
|
@@ -161,6 +161,11 @@ module RunApi
|
|
|
161
161
|
# Result of adding vocals to a track.
|
|
162
162
|
class AddVocalsResponse < TextToMusicResponse; end
|
|
163
163
|
|
|
164
|
+
# Result of a spoken audio generation task.
|
|
165
|
+
class TextToSpeechResponse < AsyncTaskResponse
|
|
166
|
+
optional :audios, [-> { Audio }]
|
|
167
|
+
end
|
|
168
|
+
|
|
164
169
|
# Result of a sound effect generation task (uses SoundAudio instead of Audio).
|
|
165
170
|
class TextToSoundResponse < AsyncTaskResponse
|
|
166
171
|
optional :audios, [-> { SoundAudio }]
|
data/lib/runapi/suno.rb
CHANGED
|
@@ -4,8 +4,6 @@ require "runapi/core"
|
|
|
4
4
|
require_relative "suno/types"
|
|
5
5
|
require_relative "suno/types/completed_responses"
|
|
6
6
|
require_relative "suno/types/resource_responses"
|
|
7
|
-
require_relative "suno/contract_gen"
|
|
8
|
-
require_relative "suno/validators"
|
|
9
7
|
require_relative "suno/resources/text_to_music"
|
|
10
8
|
require_relative "suno/resources/extend_music"
|
|
11
9
|
require_relative "suno/resources/audio_action"
|
|
@@ -27,6 +25,7 @@ require_relative "suno/resources/get_timestamped_lyrics"
|
|
|
27
25
|
require_relative "suno/resources/replace_section"
|
|
28
26
|
require_relative "suno/resources/create_mashup"
|
|
29
27
|
require_relative "suno/resources/text_to_sound"
|
|
28
|
+
require_relative "suno/resources/text_to_speech"
|
|
30
29
|
require_relative "suno/resources/voice_to_validation_phrase"
|
|
31
30
|
require_relative "suno/resources/regenerate_validation_phrase"
|
|
32
31
|
require_relative "suno/resources/generate_voice"
|
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.
|
|
4
|
+
version: 0.7.0
|
|
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.
|
|
18
|
+
version: 0.6.1
|
|
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.
|
|
25
|
+
version: 0.6.1
|
|
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
|
|
@@ -39,7 +39,6 @@ files:
|
|
|
39
39
|
- lib/runapi-suno.rb
|
|
40
40
|
- lib/runapi/suno.rb
|
|
41
41
|
- lib/runapi/suno/client.rb
|
|
42
|
-
- lib/runapi/suno/contract_gen.rb
|
|
43
42
|
- lib/runapi/suno/resources/add_instrumental.rb
|
|
44
43
|
- lib/runapi/suno/resources/add_samples.rb
|
|
45
44
|
- lib/runapi/suno/resources/add_vocals.rb
|
|
@@ -70,6 +69,7 @@ files:
|
|
|
70
69
|
- lib/runapi/suno/resources/style_expansions.rb
|
|
71
70
|
- lib/runapi/suno/resources/text_to_music.rb
|
|
72
71
|
- lib/runapi/suno/resources/text_to_sound.rb
|
|
72
|
+
- lib/runapi/suno/resources/text_to_speech.rb
|
|
73
73
|
- lib/runapi/suno/resources/timestamped_lyrics.rb
|
|
74
74
|
- lib/runapi/suno/resources/visualize_music.rb
|
|
75
75
|
- lib/runapi/suno/resources/voice_to_validation_phrase.rb
|
|
@@ -77,7 +77,6 @@ files:
|
|
|
77
77
|
- lib/runapi/suno/types.rb
|
|
78
78
|
- lib/runapi/suno/types/completed_responses.rb
|
|
79
79
|
- lib/runapi/suno/types/resource_responses.rb
|
|
80
|
-
- lib/runapi/suno/validators.rb
|
|
81
80
|
homepage: https://runapi.ai/models/suno
|
|
82
81
|
licenses:
|
|
83
82
|
- Apache-2.0
|