runapi-elevenlabs 0.2.11 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b2134363105d20386d6fb5957476bd999e65debc098147f93c4f58bf07ea6be
4
- data.tar.gz: 32fb0df29d86c530536ef6404ae5ca5a55f327238c018bc25530418a322ab398
3
+ metadata.gz: cd25f544902938ae4662ce2ea1c672f72f4db022ed9dfd05409e2801b37a384f
4
+ data.tar.gz: 8d6075bd4d49d5c37a02ae35626625da5b9b4564632648cbd16d4c3dfd30ed44
5
5
  SHA512:
6
- metadata.gz: f1439ace97c22014de87c572cdd67ce76ed73d37daeb46a9390d5a21fc7f21af81c90717f71ee9da1be257c2c807e565d686b88d620dd01131faa44d50f967a0
7
- data.tar.gz: 7e9bd350134f1eac6bc0ae4e1c9dae0b5c12fc981129b8deb4da9998a52d989302c4a18c1a89b152bcafa0abf5240b957d88f1d0c52ba41c366675592dba6c72
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,7 +21,6 @@ module RunApi
21
21
 
22
22
  def create(options: nil, **params)
23
23
  params = compact_params(params)
24
- raise Core::ValidationError, "dialogue is required" unless param(params, :dialogue)
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
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "runapi/core"
4
- require_relative "elevenlabs/contract_gen"
5
4
  require_relative "elevenlabs/types"
6
5
  require_relative "elevenlabs/resources/text_to_speech"
7
6
  require_relative "elevenlabs/resources/text_to_dialogue"
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.2.11
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.5.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.5.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
@@ -70,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
69
  - !ruby/object:Gem::Version
71
70
  version: '0'
72
71
  requirements: []
73
- rubygems_version: 4.0.17
72
+ rubygems_version: 4.0.10
74
73
  specification_version: 4
75
74
  summary: ElevenLabs Ruby SDK for RunAPI
76
75
  test_files: []
@@ -1,81 +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
- "output_format" => {
44
- "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"]
45
- },
46
- "text" => {
47
- "required" => true
48
- }
49
- }
50
- }
51
- },
52
- "text-to-speech" => {
53
- "models" => ["text-to-speech-multilingual-v2", "text-to-speech-turbo-v2.5"],
54
- "fields_by_model" => {
55
- "text-to-speech-multilingual-v2" => {
56
- "model" => {
57
- "required" => true
58
- },
59
- "text" => {
60
- "required" => true
61
- }
62
- },
63
- "text-to-speech-turbo-v2.5" => {
64
- "model" => {
65
- "required" => true
66
- },
67
- "text" => {
68
- "required" => true
69
- }
70
- }
71
- },
72
- "rules" => [{
73
- "when" => {
74
- "model" => "text-to-speech-multilingual-v2"
75
- },
76
- "required" => ["voice"]
77
- }]
78
- }
79
- }.freeze
80
- end
81
- end