runapi-elevenlabs 0.2.4 → 0.2.6

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: 0ccee48224dc7daf4be712053ee8605674219ac54edd42dc5c883ec0f5e4ab9e
4
- data.tar.gz: f2ca8d28a29857e5b84f84bd1ef3b101367f42f8ef4728dbe0b68a001f13d2a0
3
+ metadata.gz: 2229b7034723a96b61a1e969d19787c9765f713c50c6ef6fe14c1b75678d5807
4
+ data.tar.gz: 7d95a8156738a7b4c503320c77f6e49f917e88239d5664a85cc79efca740a93e
5
5
  SHA512:
6
- metadata.gz: c1694a6330534568fd223d3c374ab39d170d98ce78b980b83d81007469bd258d9da86dea12888e594a40959d7d62e59dd9e14498aab79a1c3f9bf9e5fce492ce
7
- data.tar.gz: a028822b5aa1ee859848a1dea81166c3db92fe3413dddfdbd644846dccb34a21b8040466ff8b6a93ebf989f1d40bc4495daf62f31c5bce3049bbf4617988d42f
6
+ metadata.gz: 664cda394dfc9e26655b26f41c8267fb60f55e1c50b6c9bcbca6d55f3aec28e91a64b3e48bf0fb57348b8a5cc0042596e133787cfe33407777ed4bc7e523069d
7
+ data.tar.gz: '0781f940b42c14ed9b87a2992b6345f15679d9da86622e938c312f6f626cb3ff700ff6efac92871f6d6331302bd5ce38ca790e391106510e12779bff5bfe4e84'
data/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # Elevenlabs API Ruby SDK for RunAPI
2
+
3
+ The elevenlabs api Ruby SDK is the language-specific package for ElevenLabs on RunAPI. Use this elevenlabs api package for voice, dialogue, transcription, sound effect, and cleanup flows when your application needs JSON request bodies, task status lookup, and consistent RunAPI errors in Ruby.
4
+
5
+ This elevenlabs api README is the Ruby package guide inside the public `elevenlabs-sdk` repository. For the repository overview, start at `../README.md`; for model details, use https://runapi.ai/models/elevenlabs; for API reference, use https://runapi.ai/docs#elevenlabs; for SDK docs, use https://runapi.ai/docs#sdk-elevenlabs.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ gem install runapi-elevenlabs
11
+ ```
12
+
13
+ ## Quick start
14
+
15
+ ```ruby
16
+ require "runapi-elevenlabs"
17
+
18
+ client = RunApi::Elevenlabs::Client.new
19
+ task = client.speeches.create(
20
+ # Pass the ElevenLabs JSON request body from https://runapi.ai/docs#elevenlabs.
21
+ )
22
+ status = client.speeches.get(task.id)
23
+ ```
24
+
25
+ Use `create` when you want to submit a task and return quickly, `get` when you need the latest task state, and `run` when a script should create and poll until completion. In web request handlers, prefer `create` plus webhook or later `get` polling so a worker is not held open.
26
+
27
+ ## Language notes
28
+
29
+ Use Ruby keyword arguments and the `RunApi::Elevenlabs` error classes when building audio jobs, Rails workers, or scripts. The available resources include speeches, dialogues, sound effects, transcriptions, and audio isolations. Keep `RUNAPI_API_KEY` in the environment or your secret manager; never commit API keys or callback secrets.
30
+
31
+ ## Links
32
+
33
+ - Model page: https://runapi.ai/models/elevenlabs
34
+ - SDK docs: https://runapi.ai/docs#sdk-elevenlabs
35
+ - Product docs: https://runapi.ai/docs#elevenlabs
36
+ - Pricing and rate limits: https://runapi.ai/models/elevenlabs/text-to-speech-turbo-v2.5
37
+ - Provider comparison: https://runapi.ai/providers/elevenlabs
38
+ - Full catalog: https://runapi.ai/models
39
+ - Repository: https://github.com/runapi-ai/elevenlabs-sdk
40
+
41
+ ## License
42
+
43
+ Licensed under the Apache License, Version 2.0.
@@ -21,7 +21,7 @@ module RunApi
21
21
 
22
22
  def create(**params)
23
23
  params = compact_params(params)
24
- raise Core::ValidationError, "audio_url is required" unless param(params, :audio_url)
24
+ raise Core::ValidationError, "source_audio_url is required" unless param(params, :source_audio_url)
25
25
  request(:post, ENDPOINT, body: params)
26
26
  end
27
27
 
@@ -21,7 +21,7 @@ module RunApi
21
21
 
22
22
  def create(**params)
23
23
  params = compact_params(params)
24
- raise Core::ValidationError, "audio_url is required" unless param(params, :audio_url)
24
+ raise Core::ValidationError, "source_audio_url is required" unless param(params, :source_audio_url)
25
25
  request(:post, ENDPOINT, body: params)
26
26
  end
27
27
 
@@ -36,6 +36,7 @@ module RunApi
36
36
  raise Core::ValidationError, "model is required" unless model
37
37
  raise Core::ValidationError, "Invalid model: #{model}" unless Types::TEXT_TO_SPEECH_MODELS.include?(model)
38
38
  raise Core::ValidationError, "text is required" unless param(params, :text)
39
+ raise Core::ValidationError, "voice is required for text-to-speech-multilingual-v2" if model == "text-to-speech-multilingual-v2" && !param(params, :voice)
39
40
  end
40
41
  end
41
42
  end
@@ -4,6 +4,7 @@ module RunApi
4
4
  module Elevenlabs
5
5
  module Types
6
6
  TEXT_TO_SPEECH_MODELS = %w[text-to-speech-turbo-v2.5 text-to-speech-multilingual-v2].freeze
7
+ DEFAULT_TEXT_TO_SPEECH_VOICE = "EkK5I93UQWFDigLMpZcX"
7
8
  TEXT_TO_SOUND_OUTPUT_FORMATS = %w[
8
9
  mp3_22050_32 mp3_44100_32 mp3_44100_64 mp3_44100_96 mp3_44100_128 mp3_44100_192
9
10
  pcm_8000 pcm_16000 pcm_22050 pcm_24000 pcm_44100 pcm_48000
@@ -21,7 +22,7 @@ module RunApi
21
22
  end
22
23
 
23
24
  class AudioTaskResponse < AsyncTaskResponse
24
- optional :audios, [ -> { Audio } ]
25
+ optional :audios, [-> { Audio }]
25
26
  optional :error, String
26
27
  end
27
28
 
@@ -34,7 +35,7 @@ module RunApi
34
35
  # `status: "completed"`. Result fields are required so consumers never
35
36
  # have to null-check them on a successful task.
36
37
  class CompletedAudioTaskResponse < AudioTaskResponse
37
- required :audios, [ -> { Audio } ]
38
+ required :audios, [-> { Audio }]
38
39
  end
39
40
 
40
41
  class CompletedSpeechToTextResponse < SpeechToTextResponse
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.4
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - RunAPI
@@ -15,22 +15,27 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 0.2.4
18
+ version: 0.2.5
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.4
26
- description: RunAPI ElevenLabs SDK for JavaScript, Ruby, and Go
25
+ version: 0.2.5
26
+ description: The elevenlabs api Ruby SDK is the language-specific package for ElevenLabs
27
+ on RunAPI. Use this elevenlabs api package for voice, dialogue, transcription, sound
28
+ effect, and cleanup flows when your application needs JSON request bodies, task
29
+ status lookup, and consistent RunAPI errors in Ruby.
27
30
  email:
28
31
  - contact@runapi.ai
29
32
  executables: []
30
33
  extensions: []
31
- extra_rdoc_files: []
34
+ extra_rdoc_files:
35
+ - README.md
32
36
  files:
33
37
  - LICENSE
38
+ - README.md
34
39
  - lib/runapi-elevenlabs.rb
35
40
  - lib/runapi/elevenlabs.rb
36
41
  - lib/runapi/elevenlabs/client.rb
@@ -45,7 +50,7 @@ licenses:
45
50
  - Apache-2.0
46
51
  metadata:
47
52
  homepage_uri: https://runapi.ai/models/elevenlabs
48
- documentation_uri: https://github.com/runapi-ai/elevenlabs-sdk/blob/main/README.md
53
+ documentation_uri: https://github.com/runapi-ai/elevenlabs-sdk/blob/main/ruby/README.md
49
54
  source_code_uri: https://github.com/runapi-ai/elevenlabs-sdk
50
55
  changelog_uri: https://github.com/runapi-ai/elevenlabs-sdk/blob/main/CHANGELOG.md
51
56
  rdoc_options: []
@@ -64,5 +69,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
69
  requirements: []
65
70
  rubygems_version: 4.0.10
66
71
  specification_version: 4
67
- summary: ElevenLabs API SDKs for JavaScript, Ruby, and Go on RunAPI.
72
+ summary: Elevenlabs API Ruby SDK for RunAPI
68
73
  test_files: []