runapi-elevenlabs 0.3.0 → 0.4.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/lib/runapi/elevenlabs/resources/isolate_audio.rb +0 -1
- data/lib/runapi/elevenlabs/resources/speech_to_text.rb +0 -1
- data/lib/runapi/elevenlabs/resources/text_to_dialogue.rb +0 -1
- data/lib/runapi/elevenlabs/resources/text_to_sound.rb +0 -4
- data/lib/runapi/elevenlabs/resources/text_to_speech.rb +0 -10
- data/lib/runapi/elevenlabs.rb +0 -1
- metadata +3 -4
- data/lib/runapi/elevenlabs/contract_gen.rb +0 -84
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cd25f544902938ae4662ce2ea1c672f72f4db022ed9dfd05409e2801b37a384f
|
|
4
|
+
data.tar.gz: 8d6075bd4d49d5c37a02ae35626625da5b9b4564632648cbd16d4c3dfd30ed44
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e5130d1b1c94fdb8ce61d07e43e7f1eab8024d7c4f6b650ac8d9ab94ea03ba1028422b9855fb3d370f766d5cdd48c531131a6597ddc2a8e47f96f22acfb288ef
|
|
7
|
+
data.tar.gz: 4a08f2c9030d6f5c04ab64269b44581cd47255f47d5c6edc2b27bcf1d670747c45f5f5a481e64172b63d6665d3a494329927984b618cb9868514dcb6b77b2101
|
|
@@ -21,7 +21,6 @@ module RunApi
|
|
|
21
21
|
|
|
22
22
|
def create(options: nil, **params)
|
|
23
23
|
params = compact_params(params)
|
|
24
|
-
raise Core::ValidationError, "source_audio_url is required" unless param(params, :source_audio_url)
|
|
25
24
|
request(:post, ENDPOINT, body: params, options: options)
|
|
26
25
|
end
|
|
27
26
|
|
|
@@ -21,7 +21,6 @@ module RunApi
|
|
|
21
21
|
|
|
22
22
|
def create(options: nil, **params)
|
|
23
23
|
params = compact_params(params)
|
|
24
|
-
raise Core::ValidationError, "source_audio_url is required" unless param(params, :source_audio_url)
|
|
25
24
|
request(:post, ENDPOINT, body: params, options: options)
|
|
26
25
|
end
|
|
27
26
|
|
|
@@ -21,10 +21,6 @@ module RunApi
|
|
|
21
21
|
|
|
22
22
|
def create(options: nil, **params)
|
|
23
23
|
params = compact_params(params)
|
|
24
|
-
raise Core::ValidationError, "text is required" unless param(params, :text)
|
|
25
|
-
if param(params, :output_format) && !Types::TEXT_TO_SOUND_OUTPUT_FORMATS.include?(param(params, :output_format))
|
|
26
|
-
raise Core::ValidationError, "Invalid output_format"
|
|
27
|
-
end
|
|
28
24
|
request(:post, ENDPOINT, body: params, options: options)
|
|
29
25
|
end
|
|
30
26
|
|
|
@@ -21,22 +21,12 @@ module RunApi
|
|
|
21
21
|
|
|
22
22
|
def create(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
|
|
|
28
27
|
def get(id, options: nil)
|
|
29
28
|
request(:get, "#{ENDPOINT}/#{id}", options: options)
|
|
30
29
|
end
|
|
31
|
-
|
|
32
|
-
private
|
|
33
|
-
|
|
34
|
-
def validate_params!(params)
|
|
35
|
-
validate_contract!(CONTRACT["text-to-speech"], params)
|
|
36
|
-
if param(params, :model) == "text-to-speech-multilingual-v2" && !param(params, :voice)
|
|
37
|
-
raise Core::ValidationError, "voice is required for text-to-speech-multilingual-v2"
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
30
|
end
|
|
41
31
|
end
|
|
42
32
|
end
|
data/lib/runapi/elevenlabs.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: runapi-elevenlabs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.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.0
|
|
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.0
|
|
26
26
|
description: The ElevenLabs Ruby SDK is the language-specific package for ElevenLabs
|
|
27
27
|
on RunAPI. Use this package for voice, dialogue, transcription, sound effect, and
|
|
28
28
|
audio cleanup workflows when your application needs request bodies, task status
|
|
@@ -39,7 +39,6 @@ files:
|
|
|
39
39
|
- lib/runapi-elevenlabs.rb
|
|
40
40
|
- lib/runapi/elevenlabs.rb
|
|
41
41
|
- lib/runapi/elevenlabs/client.rb
|
|
42
|
-
- lib/runapi/elevenlabs/contract_gen.rb
|
|
43
42
|
- lib/runapi/elevenlabs/resources/isolate_audio.rb
|
|
44
43
|
- lib/runapi/elevenlabs/resources/speech_to_text.rb
|
|
45
44
|
- lib/runapi/elevenlabs/resources/text_to_dialogue.rb
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module RunApi
|
|
4
|
-
module Elevenlabs
|
|
5
|
-
CONTRACT = {
|
|
6
|
-
"isolate-audio" => {
|
|
7
|
-
"models" => ["audio-isolation"],
|
|
8
|
-
"fields_by_model" => {
|
|
9
|
-
"audio-isolation" => {
|
|
10
|
-
"source_audio_url" => {
|
|
11
|
-
"required" => true
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
"speech-to-text" => {
|
|
17
|
-
"models" => ["speech-to-text"],
|
|
18
|
-
"fields_by_model" => {
|
|
19
|
-
"speech-to-text" => {
|
|
20
|
-
"source_audio_url" => {
|
|
21
|
-
"required" => true
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"text-to-dialogue" => {
|
|
27
|
-
"models" => ["text-to-dialogue-v3"],
|
|
28
|
-
"fields_by_model" => {
|
|
29
|
-
"text-to-dialogue-v3" => {
|
|
30
|
-
"dialogue" => {
|
|
31
|
-
"required" => true
|
|
32
|
-
},
|
|
33
|
-
"stability" => {
|
|
34
|
-
"enum" => [0.0, 0.5, 1.0]
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"text-to-sound" => {
|
|
40
|
-
"models" => ["sound-effect-v2"],
|
|
41
|
-
"fields_by_model" => {
|
|
42
|
-
"sound-effect-v2" => {
|
|
43
|
-
"duration_seconds" => {
|
|
44
|
-
"required" => true
|
|
45
|
-
},
|
|
46
|
-
"output_format" => {
|
|
47
|
-
"enum" => ["mp3_22050_32", "mp3_44100_32", "mp3_44100_64", "mp3_44100_96", "mp3_44100_128", "mp3_44100_192", "pcm_8000", "pcm_16000", "pcm_22050", "pcm_24000", "pcm_44100", "pcm_48000", "ulaw_8000", "alaw_8000", "opus_48000_32", "opus_48000_64", "opus_48000_96", "opus_48000_128", "opus_48000_192"]
|
|
48
|
-
},
|
|
49
|
-
"text" => {
|
|
50
|
-
"required" => true
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"text-to-speech" => {
|
|
56
|
-
"models" => ["text-to-speech-multilingual-v2", "text-to-speech-turbo-v2.5"],
|
|
57
|
-
"fields_by_model" => {
|
|
58
|
-
"text-to-speech-multilingual-v2" => {
|
|
59
|
-
"model" => {
|
|
60
|
-
"required" => true
|
|
61
|
-
},
|
|
62
|
-
"text" => {
|
|
63
|
-
"required" => true
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
"text-to-speech-turbo-v2.5" => {
|
|
67
|
-
"model" => {
|
|
68
|
-
"required" => true
|
|
69
|
-
},
|
|
70
|
-
"text" => {
|
|
71
|
-
"required" => true
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
"rules" => [{
|
|
76
|
-
"when" => {
|
|
77
|
-
"model" => "text-to-speech-multilingual-v2"
|
|
78
|
-
},
|
|
79
|
-
"required" => ["voice"]
|
|
80
|
-
}]
|
|
81
|
-
}
|
|
82
|
-
}.freeze
|
|
83
|
-
end
|
|
84
|
-
end
|