elevenlabs_client 0.6.0 → 0.8.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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +220 -0
  3. data/README.md +181 -58
  4. data/lib/elevenlabs_client/client.rb +110 -269
  5. data/lib/elevenlabs_client/configuration.rb +119 -0
  6. data/lib/elevenlabs_client/endpoints/admin/history.rb +1 -1
  7. data/lib/elevenlabs_client/endpoints/admin/pronunciation_dictionaries.rb +103 -0
  8. data/lib/elevenlabs_client/endpoints/admin/samples.rb +30 -0
  9. data/lib/elevenlabs_client/endpoints/admin/service_account_api_keys.rb +77 -0
  10. data/lib/elevenlabs_client/endpoints/admin/service_accounts.rb +29 -0
  11. data/lib/elevenlabs_client/endpoints/admin/user.rb +12 -0
  12. data/lib/elevenlabs_client/endpoints/admin/webhooks.rb +33 -0
  13. data/lib/elevenlabs_client/endpoints/admin/workspace_groups.rb +56 -0
  14. data/lib/elevenlabs_client/endpoints/admin/workspace_invites.rb +52 -0
  15. data/lib/elevenlabs_client/endpoints/admin/workspace_members.rb +31 -0
  16. data/lib/elevenlabs_client/endpoints/admin/workspace_resources.rb +53 -0
  17. data/lib/elevenlabs_client/endpoints/admin/workspace_webhooks.rb +30 -0
  18. data/lib/elevenlabs_client/endpoints/agents_platform/agents.rb +165 -0
  19. data/lib/elevenlabs_client/endpoints/agents_platform/batch_calling.rb +89 -0
  20. data/lib/elevenlabs_client/endpoints/agents_platform/conversations.rb +121 -0
  21. data/lib/elevenlabs_client/endpoints/agents_platform/knowledge_base.rb +234 -0
  22. data/lib/elevenlabs_client/endpoints/agents_platform/llm_usage.rb +50 -0
  23. data/lib/elevenlabs_client/endpoints/agents_platform/mcp_servers.rb +139 -0
  24. data/lib/elevenlabs_client/endpoints/agents_platform/outbound_calling.rb +55 -0
  25. data/lib/elevenlabs_client/endpoints/agents_platform/phone_numbers.rb +86 -0
  26. data/lib/elevenlabs_client/endpoints/agents_platform/test_invocations.rb +44 -0
  27. data/lib/elevenlabs_client/endpoints/agents_platform/tests.rb +138 -0
  28. data/lib/elevenlabs_client/endpoints/agents_platform/tools.rb +107 -0
  29. data/lib/elevenlabs_client/endpoints/agents_platform/widgets.rb +52 -0
  30. data/lib/elevenlabs_client/endpoints/agents_platform/workspace.rb +130 -0
  31. data/lib/elevenlabs_client/errors.rb +4 -0
  32. data/lib/elevenlabs_client/http_client.rb +325 -0
  33. data/lib/elevenlabs_client/version.rb +1 -1
  34. data/lib/elevenlabs_client.rb +99 -15
  35. metadata +27 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ac0295ca5dadf36f14152af7d6c2f4fa39dd7a2c8b59837551fc3bd8839d419
4
- data.tar.gz: dabd65a40bb17aa262f2251f125d8edadaccde957b4fe9084b91384f59b54ee5
3
+ metadata.gz: 165b9737c40e5e121765cd1b279343d95a5bdf263aaf94c0d44f8205d1ba6f6d
4
+ data.tar.gz: e87f64475a509af9f4c5a8fc0080cc589e88a284cf5101ffe101694a188dc5f4
5
5
  SHA512:
6
- metadata.gz: ceb86051b205481e427aec671deeb55fbeaff5f68bf99fe7257e34ce926cd83b7ec7644d5daf4854dc67ff6ece921c23ba99e6301063beb1116084f6820de4be
7
- data.tar.gz: e6ab2b8907aa8b02e4ba222a407d5aa3c67e0e86b303421b073f0ed7744a9a9712510d88f75247cd534ddc1c67ccfb8ed5c0d411cee9cd3632288cf35d544036
6
+ metadata.gz: 15e3fc076b5421b37c8c137c154ce3d31e9ed1e07c366ffa47ed4b50337307da942b17ea75fe63a73805679cd07b76eeb2c56011b1ebc4ba5acbc0e477401b05
7
+ data.tar.gz: a8abacc7184134652c94e24a37a8f111b5a99dfb284b380f07b1a03ce945b62da5253e661f54101877a6aba2fbfd9c49dc6450cfe43fb3b728a8d07935f2f5b5
data/CHANGELOG.md CHANGED
@@ -7,6 +7,226 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.8.0] - 2024-09-17
11
+
12
+ ### Added
13
+ - **🏢 Admin: Workspace Management** - Complete workspace administration suite
14
+ - **Workspace Members** (`client.workspace_members.*`)
15
+ - Update member: `client.workspace_members.update_member(email:, is_locked: nil, workspace_role: nil)`
16
+ - **Workspace Resources** (`client.workspace_resources.*`)
17
+ - Get resource metadata: `client.workspace_resources.get_resource(resource_id:, resource_type:)`
18
+ - Share resource: `client.workspace_resources.share(resource_id:, role:, resource_type:, user_email: nil, group_id: nil, workspace_api_key_id: nil)`
19
+ - Unshare resource: `client.workspace_resources.unshare(resource_id:, resource_type:, user_email: nil, group_id: nil, workspace_api_key_id: nil)`
20
+ - **Workspace Groups** (`client.workspace_groups.*`)
21
+ - Search groups: `client.workspace_groups.search(name:)`
22
+ - Add member: `client.workspace_groups.add_member(group_id:, email:)`
23
+ - Remove member: `client.workspace_groups.remove_member(group_id:, email:)`
24
+ - **Workspace Invites** (`client.workspace_invites.*`)
25
+ - Invite user: `client.workspace_invites.invite(email:, group_ids: nil, workspace_permission: nil)`
26
+ - Invite multiple users: `client.workspace_invites.invite_bulk(emails:, group_ids: nil)`
27
+ - Delete invite: `client.workspace_invites.delete_invite(email:)`
28
+ - **Workspace Webhooks** (`client.workspace_webhooks.*`)
29
+ - List workspace webhooks: `client.workspace_webhooks.list(include_usages: nil)`
30
+
31
+ - **📚 Admin: Enhanced User & Content Management**
32
+ - **User Subscription** (`client.user.*`)
33
+ - Get extended user subscription: `client.user.get_subscription` (alias: `subscription`)
34
+ - **Pronunciation Dictionaries** (`client.pronunciation_dictionaries.*`)
35
+ - Create dictionary from file: `client.pronunciation_dictionaries.add_from_file(name:, file_io: nil, filename: nil, description: nil, workspace_access: nil)`
36
+ - Create dictionary from rules: `client.pronunciation_dictionaries.add_from_rules(name:, rules:, description: nil, workspace_access: nil)`
37
+ - Get dictionary metadata: `client.pronunciation_dictionaries.get(pronunciation_dictionary_id)`
38
+ - Update dictionary: `client.pronunciation_dictionaries.update(pronunciation_dictionary_id, **attributes)`
39
+ - Download dictionary version (PLS): `client.pronunciation_dictionaries.download_pronunciation_dictionary_version(dictionary_id:, version_id:)`
40
+ - List dictionaries: `client.pronunciation_dictionaries.list_pronunciation_dictionaries(cursor:, page_size:, sort:, sort_direction:)`
41
+
42
+ - **🤖 Agents Platform** - Complete conversational AI agent management system
43
+ - **Agent Management** (`client.agents.*`)
44
+ - Create agent: `client.agents.create(conversation_config:, platform_settings: nil, name: nil, tags: nil)`
45
+ - Get agent: `client.agents.get(agent_id)`
46
+ - List agents: `client.agents.list(page_size: nil, search: nil, sort_direction: nil, sort_by: nil, cursor: nil)`
47
+ - Update agent: `client.agents.update(agent_id, **options)`
48
+ - Delete agent: `client.agents.delete(agent_id)`
49
+ - Duplicate agent: `client.agents.duplicate(agent_id, **options)`
50
+ - **Conversation Management** (`client.conversations.*`)
51
+ - Create conversation: `client.conversations.create(agent_id:, **options)`
52
+ - Get conversation: `client.conversations.get(conversation_id)`
53
+ - List conversations: `client.conversations.list(**options)`
54
+ - Delete conversation: `client.conversations.delete(conversation_id)`
55
+ - Get conversation signatures: `client.conversations.get_conversation_signatures(conversation_id)`
56
+ - **Tools & Integrations** (`client.tools.*`)
57
+ - List tools: `client.tools.list`
58
+ - Get tool: `client.tools.get(tool_id)`
59
+ - Create tool: `client.tools.create(tool_config)`
60
+ - Update tool: `client.tools.update(tool_id, **options)`
61
+ - Delete tool: `client.tools.delete(tool_id)`
62
+ - **Knowledge Base** (`client.knowledge_base.*`)
63
+ - Create knowledge base: `client.knowledge_base.create(name:, **options)`
64
+ - Get knowledge base: `client.knowledge_base.get(knowledge_base_id)`
65
+ - List knowledge bases: `client.knowledge_base.list(**options)`
66
+ - Delete knowledge base: `client.knowledge_base.delete(knowledge_base_id)`
67
+ - **Testing & Quality Assurance** (`client.tests.*`, `client.test_invocations.*`)
68
+ - Create test: `client.tests.create(agent_id:, name:, test_questions:, **options)`
69
+ - Get test: `client.tests.get(test_id)`
70
+ - List tests: `client.tests.list(**options)`
71
+ - Delete test: `client.tests.delete(test_id)`
72
+ - Run test: `client.test_invocations.run(test_id:, **options)`
73
+ - Get test results: `client.test_invocations.get(test_invocation_id)`
74
+ - List test invocations: `client.test_invocations.list(**options)`
75
+ - **Phone & Communication** (`client.phone_numbers.*`, `client.outbound_calling.*`, `client.batch_calling.*`)
76
+ - List phone numbers: `client.phone_numbers.list(**options)`
77
+ - Get phone number: `client.phone_numbers.get(phone_number_id)`
78
+ - Create outbound call: `client.outbound_calling.create(agent_id:, customer_phone_number:, **options)`
79
+ - Submit batch calls: `client.batch_calling.submit(call_name:, agent_id:, agent_phone_number_id:, scheduled_time_unix:, recipients:)`
80
+ - List batch calls: `client.batch_calling.list(**options)`
81
+ - Get batch call: `client.batch_calling.get(batch_call_id)`
82
+ - **Widgets & Integration** (`client.widgets.*`)
83
+ - Create widget: `client.widgets.create(agent_id:, name:, **options)`
84
+ - Get widget: `client.widgets.get(widget_id)`
85
+ - List widgets: `client.widgets.list(**options)`
86
+ - Delete widget: `client.widgets.delete(widget_id)`
87
+ - **Workspace & Analytics** (`client.workspace.*`, `client.llm_usage.*`)
88
+ - Get workspace settings: `client.workspace.get`
89
+ - Update workspace: `client.workspace.update(**options)`
90
+ - Get LLM usage: `client.llm_usage.get(**options)`
91
+ - **MCP Servers** (`client.mcp_servers.*`)
92
+ - Create MCP server: `client.mcp_servers.create(config:)`
93
+ - List MCP servers: `client.mcp_servers.list`
94
+ - Get MCP server: `client.mcp_servers.get(mcp_server_id)`
95
+ - Update MCP server: `client.mcp_servers.update(mcp_server_id, **options)`
96
+ - Delete MCP server: `client.mcp_servers.delete(mcp_server_id)`
97
+
98
+ ### Enhanced
99
+ - **🔧 HTTP Client Architecture** - Enhanced HTTP client with new methods
100
+ - Added `delete_with_body` method for DELETE requests with request bodies
101
+ - Improved error handling across all HTTP methods
102
+ - Enhanced configuration system with `Configuration` class
103
+ - Added `HttpClient` class for better separation of concerns
104
+
105
+ ### Docs
106
+ - **📚 Admin Documentation**
107
+ - Added `docs/admin/PRONUNCIATION_DICTIONARIES.md`
108
+ - Added `docs/admin/WORKSPACE_GROUPS.md`
109
+ - Added `docs/admin/WORKSPACE_INVITES.md`
110
+ - Added `docs/admin/WORKSPACE_MEMBERS.md`
111
+ - Added `docs/admin/WORKSPACE_RESOURCES.md`
112
+ - Added `docs/admin/WORKSPACE_WEBHOOKS.md`
113
+ - **🤖 Agents Platform Documentation**
114
+ - Added complete `docs/agents_platform/` directory with comprehensive guides:
115
+ - `AGENTS.md` - Agent creation and management
116
+ - `CONVERSATIONS.md` - Conversation handling
117
+ - `TOOLS.md` - Tool integration and management
118
+ - `KNOWLEDGE_BASE.md` - Knowledge base management
119
+ - `TESTS.md` - Testing and quality assurance
120
+ - `TEST_INVOCATIONS.md` - Test execution and results
121
+ - `PHONE_NUMBERS.md` - Phone number management
122
+ - `OUTBOUND_CALLING.md` - Outbound call handling
123
+ - `BATCH_CALLING.md` - Batch calling operations
124
+ - `WIDGETS.md` - Widget creation and embedding
125
+ - `WORKSPACE.md` - Workspace configuration
126
+ - `LLM_USAGE.md` - LLM usage analytics
127
+ - `MCP_SERVERS.md` - MCP server integration
128
+ - **📖 Architecture Documentation**
129
+ - Added `docs/ARCHITECTURE.md` - Complete system architecture overview
130
+ - Updated `docs/admin/README.md` and main `README.md` with all new endpoints and examples
131
+
132
+ ### Examples
133
+ - **🎯 Admin Controllers** - Production-ready Rails integration examples
134
+ - Added `examples/admin/workspace_groups_controller.rb`
135
+ - Added `examples/admin/workspace_invites_controller.rb`
136
+ - Added `examples/admin/workspace_members_controller.rb`
137
+ - Added `examples/admin/workspace_resources_controller.rb`
138
+ - Added `examples/admin/workspace_webhooks_controller.rb`
139
+ - **🤖 Agents Platform Controllers** - Complete conversational AI examples
140
+ - Added `examples/agents_platform/agents_controller.rb`
141
+ - Added `examples/agents_platform/conversations_controller.rb`
142
+ - Added `examples/agents_platform/tools_controller.rb`
143
+ - Added `examples/agents_platform/knowledge_base_controller.rb`
144
+ - Added `examples/agents_platform/tests_controller.rb`
145
+ - Added `examples/agents_platform/test_invocations_controller.rb`
146
+ - Added `examples/agents_platform/phone_numbers_controller.rb`
147
+ - Added `examples/agents_platform/outbound_calling_controller.rb`
148
+ - Added `examples/agents_platform/batch_calling_controller.rb`
149
+ - Added `examples/agents_platform/widgets_controller.rb`
150
+ - Added `examples/agents_platform/workspace_controller.rb`
151
+ - Added `examples/agents_platform/llm_usage_controller.rb`
152
+ - Added `examples/agents_platform/mcp_servers_controller.rb`
153
+
154
+ ## [0.7.0] - 2024-09-15
155
+
156
+ ### Added
157
+ - **🗑️ Admin Samples Management** - Voice sample deletion and content moderation
158
+ - **Sample Deletion** (`client.samples.*`) - Delete voice samples by ID for content moderation and cleanup
159
+ - Comprehensive error handling for voice and sample validation
160
+ - Security-focused operations with proper authentication and authorization
161
+ - Method aliases: `delete_voice_sample`, `remove_sample`
162
+
163
+ - **🏢 Admin Service Accounts** - Complete service account monitoring and management
164
+ - **Account Monitoring** (`client.service_accounts.*`) - List all service accounts in workspace
165
+ - **API Key Analytics** - Monitor API key status, permissions, and usage across all accounts
166
+ - **Usage Tracking** - Character usage monitoring with limits and projections
167
+ - **Security Auditing** - Comprehensive security analysis and compliance reporting
168
+ - Method aliases: `list`, `all`, `service_accounts`
169
+
170
+ - **🔗 Admin Webhooks Management** - Workspace webhook monitoring and health analysis
171
+ - **Webhook Monitoring** (`client.webhooks.*`) - List all workspace webhooks with detailed status
172
+ - **Health Analysis** - Monitor webhook failures, auto-disabled status, and recent error codes
173
+ - **Security Auditing** - Authentication method analysis and HTTPS compliance checking
174
+ - **Usage Analytics** - Track webhook usage across different services and features
175
+ - Method aliases: `get_webhooks`, `all`, `webhooks`
176
+
177
+ ### Enhanced
178
+ - **📚 Documentation Expansion** - Comprehensive documentation for new admin endpoints
179
+ - Added `docs/admin/SAMPLES.md` - Voice sample management and content moderation guide (883 lines)
180
+ - Added `docs/admin/SERVICE_ACCOUNTS.md` - Service account monitoring and security analysis guide (1,264 lines)
181
+ - Added `docs/admin/WEBHOOKS.md` - Webhook management and health monitoring guide (1,264 lines)
182
+ - Updated `docs/admin/README.md` - Enhanced admin overview with all endpoints (548 lines)
183
+ - Updated main README.md with new admin endpoint documentation
184
+ - Total: 3,959 lines of additional admin documentation
185
+
186
+ - **🎯 Example Controllers** - Production-ready Rails integration examples for new endpoints
187
+ - Added `examples/admin/samples_controller.rb` - Sample deletion with content moderation workflows (767 lines)
188
+ - Added `examples/admin/service_accounts_controller.rb` - Account monitoring with analytics dashboard (500+ lines)
189
+ - Added `examples/admin/webhooks_controller.rb` - Webhook health monitoring with export capabilities (761 lines)
190
+ - All controllers include comprehensive error handling, filtering, and export functionality
191
+
192
+ ### Improved
193
+ - **🧪 Test Coverage** - Comprehensive testing for all new admin endpoints
194
+ - Added 35 new endpoint tests covering samples, service accounts, and webhooks
195
+ - Added 31 new integration tests with proper WebMock stubbing and response validation
196
+ - Enhanced error handling tests for all new admin scenarios
197
+ - Total: 66 new tests, bringing total to 874 examples with 100% pass rate
198
+
199
+ - **🔧 Client Integration** - Seamless integration of new admin endpoints
200
+ - Updated `Client` class to expose new admin endpoints (`samples`, `service_accounts`, `webhooks`)
201
+ - Enhanced error handling for admin-specific scenarios across all endpoints
202
+ - Consistent API patterns and response structures
203
+ - Proper namespacing under `ElevenlabsClient::Admin` module
204
+
205
+ ### Technical Improvements
206
+ - **🔒 Security Management** - Advanced security monitoring and compliance
207
+ - Voice sample content moderation with audit trails
208
+ - Service account permission analysis and excessive privilege detection
209
+ - Webhook security auditing with HTTPS and authentication validation
210
+ - Comprehensive security reporting and recommendation systems
211
+
212
+ - **📊 Health Monitoring** - Sophisticated health analysis across admin resources
213
+ - Webhook failure tracking with error code analysis and auto-disable detection
214
+ - Service account usage monitoring with character limit projections
215
+ - Sample deletion tracking for content moderation compliance
216
+ - Real-time health status reporting with actionable insights
217
+
218
+ - **🛡️ Content Moderation** - Professional content management capabilities
219
+ - Secure sample deletion with proper authentication and logging
220
+ - Batch sample operations for efficient content cleanup
221
+ - Audit trail support for compliance and tracking
222
+ - Integration with content moderation workflows and policies
223
+
224
+ - **📈 Analytics & Reporting** - Advanced analytics across all admin functions
225
+ - Service account usage analytics with trend analysis
226
+ - Webhook performance monitoring with failure rate calculations
227
+ - Sample deletion analytics for content moderation reporting
228
+ - Exportable reports in CSV, JSON, and Excel formats
229
+
10
230
  ## [0.6.0] - 2024-09-15
11
231
 
12
232
  ### Added
data/README.md CHANGED
@@ -4,29 +4,57 @@
4
4
 
5
5
  A comprehensive Ruby client library for the ElevenLabs API, supporting voice synthesis, dubbing, dialogue generation, sound effects, AI music composition, voice transformation, speech transcription, audio isolation, and advanced audio processing features.
6
6
 
7
+ See [Architecture Documentation](docs/ARCHITECTURE.md) for details.
8
+
7
9
  ## Features
8
10
 
9
- 🎙️ **Text-to-Speech** - Convert text to natural-sounding speech
10
- 🎬 **Dubbing** - Create dubbed versions of audio/video content
11
- 💬 **Dialogue Generation** - Multi-speaker conversations
12
- 🔊 **Sound Generation** - AI-generated sound effects and ambient audio
13
- 🎵 **Music Generation** - AI-powered music composition and streaming
14
- 🎨 **Voice Design** - Create custom voices from text descriptions
15
- 🎭 **Voice Management** - Create, edit, and manage individual voices
16
- 🔄 **Speech-to-Speech** - Transform audio from one voice to another (Voice Changer)
17
- 📝 **Speech-to-Text** - Transcribe audio and video files with advanced features
18
- 🔇 **Audio Isolation** - Remove background noise from audio files
19
- 📱 **Audio Native** - Create embeddable audio players for websites
20
- ⏱️ **Forced Alignment** - Get precise timing information for audio transcripts
21
- 📊 **Admin APIs** - Complete administrative functionality:
22
- - **History** - Manage and analyze your generated audio history
23
- - **Usage** - Monitor character usage and analytics
24
- - **User** - Access account information and subscription details
25
- - **Voice Library** - Browse and manage community shared voices
26
- - **Models** - List available models and their capabilities
27
- 📡 **Streaming** - Real-time audio streaming
28
- ⚙️ **Configurable** - Flexible configuration options
29
- 🧪 **Well-tested** - Comprehensive test coverage
11
+ ### 🎙️ **Core Audio Features**
12
+ - **Text-to-Speech** - Convert text to natural-sounding speech with timestamps
13
+ - **Speech-to-Speech** - Transform audio from one voice to another (Voice Changer)
14
+ - **Speech-to-Text** - Transcribe audio and video files with advanced features
15
+ - **Text-to-Dialogue** - Multi-speaker conversations and dialogue generation
16
+ - **Voice Design** - Create custom voices from text descriptions
17
+ - **Voice Management** - Create, edit, and manage individual voices
18
+ - **Audio Isolation** - Remove background noise from audio files
19
+ - **Forced Alignment** - Get precise timing information for audio transcripts
20
+
21
+ ### 🎬 **Content Creation**
22
+ - **Dubbing** - Create dubbed versions of audio/video content
23
+ - **Sound Generation** - AI-generated sound effects and ambient audio
24
+ - **Music Generation** - AI-powered music composition and streaming
25
+ - **Audio Native** - Create embeddable audio players for websites
26
+
27
+ ### 🤖 **Agents Platform** (Conversational AI)
28
+ - **Agents** - Create and manage AI conversational agents
29
+ - **Conversations** - Handle real-time conversations and chat interactions
30
+ - **Knowledge Base** - Upload and manage documents for agent knowledge
31
+ - **Tools** - Define and manage tools that agents can use
32
+ - **Tests** - Create and run tests for agent performance
33
+ - **Outbound Calling** - Make automated phone calls with agents
34
+ - **Batch Calling** - Execute large-scale calling campaigns
35
+ - **Phone Numbers** - Manage phone numbers for voice agents
36
+ - **Widgets** - Create embeddable chat widgets for websites
37
+ - **LLM Usage** - Monitor and analyze language model usage
38
+ - **MCP Servers** - Manage Model Context Protocol servers
39
+
40
+ ### 📊 **Admin & Management APIs**
41
+ - **History** - Manage and analyze your generated audio history
42
+ - **Usage** - Monitor character usage and analytics
43
+ - **User** - Access account information and subscription details
44
+ - **Voice Library** - Browse and manage community shared voices
45
+ - **Models** - List available models and their capabilities
46
+ - **Samples** - Delete voice samples for content moderation
47
+ - **Service Accounts** - Monitor service accounts and API keys
48
+ - **Webhooks** - Monitor workspace webhooks and their health
49
+ - **Workspace Management** - Manage workspace groups, invites, members, and resources
50
+ - **Pronunciation Dictionaries** - Custom pronunciation rules
51
+
52
+ ### 🔧 **Technical Features**
53
+ - **WebSocket Streaming** - Real-time audio streaming with low latency
54
+ - **Multiple Output Formats** - Support for various audio formats
55
+ - **Flexible Configuration** - Environment-based and programmatic configuration
56
+ - **Comprehensive Error Handling** - Detailed error messages and status codes
57
+ - **Well-tested** - Extensive test coverage with integration tests
30
58
 
31
59
  ## Installation
32
60
 
@@ -75,19 +103,31 @@ export ELEVENLABS_BASE_URL="https://api.elevenlabs.io" # Optional, defaults to
75
103
  #### Direct Configuration
76
104
 
77
105
  ```ruby
78
- # Module-level configuration
106
+ # Global configuration (recommended)
79
107
  ElevenlabsClient.configure do |config|
80
- config.properties = {
81
- elevenlabs_base_uri: "https://api.elevenlabs.io",
82
- elevenlabs_api_key: "your_api_key_here"
83
- }
108
+ config.api_key = "your_api_key_here"
109
+ config.base_url = "https://api.elevenlabs.io"
110
+ config.timeout = 30
111
+ config.retry_count = 3
84
112
  end
85
113
 
86
- # Or pass directly to client
114
+ # Use globally configured client
115
+ client = ElevenlabsClient.client
116
+
117
+ # Or pass directly to client instance
87
118
  client = ElevenlabsClient.new(
88
119
  api_key: "your_api_key_here",
89
- base_url: "https://api.elevenlabs.io"
120
+ base_url: "https://api.elevenlabs.io",
121
+ timeout: 60
90
122
  )
123
+
124
+ # Legacy Settings support (still works)
125
+ ElevenlabsClient.configure do |config|
126
+ config.properties = {
127
+ elevenlabs_base_uri: "https://api.elevenlabs.io",
128
+ elevenlabs_api_key: "your_api_key_here"
129
+ }
130
+ end
91
131
  ```
92
132
 
93
133
  ### Basic Usage
@@ -170,6 +210,18 @@ puts "Recent history: #{history['history'].length} items"
170
210
  voices = client.voice_library.get_shared_voices(category: "professional", page_size: 5)
171
211
  puts "Professional voices available: #{voices['voices'].length}"
172
212
 
213
+ # Admin Samples Management
214
+ client.samples.delete_sample(voice_id: "voice_id", sample_id: "sample_id")
215
+ puts "Sample deleted successfully"
216
+
217
+ # Service Accounts Monitoring
218
+ accounts = client.service_accounts.get_service_accounts
219
+ puts "Service accounts: #{accounts['service-accounts'].length}"
220
+
221
+ # Webhooks Management
222
+ webhooks = client.webhooks.list_webhooks(include_usages: true)
223
+ puts "Active webhooks: #{webhooks['webhooks'].length}"
224
+
173
225
  # Music Generation
174
226
  music_data = client.music.compose(
175
227
  prompt: "Upbeat electronic dance track with synthesizers",
@@ -248,25 +300,61 @@ end
248
300
 
249
301
  ### Core APIs
250
302
 
251
- - **[Dubbing API](docs/DUBBING.md)** - Create dubbed versions of audio/video content
303
+ ### 🎙️ **Core Audio APIs**
252
304
  - **[Text-to-Speech API](docs/TEXT_TO_SPEECH.md)** - Convert text to natural speech
253
- - **[Text-to-Speech Streaming API](docs/TEXT_TO_SPEECH_STREAMING.md)** - Real-time audio streaming
254
- - **[Text-to-Dialogue API](docs/TEXT_TO_DIALOGUE.md)** - Multi-speaker conversations
255
- - **[Sound Generation API](docs/SOUND_GENERATION.md)** - AI-generated sound effects
256
- - **[Music Generation API](docs/MUSIC.md)** - AI-powered music composition and streaming
257
- - **[Text-to-Voice API](docs/TEXT_TO_VOICE.md)** - Design and create custom voices
258
- - **[Voice Management API](docs/VOICES.md)** - Manage individual voices (CRUD operations)
305
+ - **[Text-to-Speech Streaming API](docs/TEXT_TO_SPEECH_STREAMING.md)** - Real-time audio streaming
306
+ - **[Text-to-Speech with Timestamps](docs/TEXT_TO_SPEECH_WITH_TIMESTAMPS.md)** - Speech synthesis with precise timing
259
307
  - **[Speech-to-Speech API](docs/SPEECH_TO_SPEECH.md)** - Transform audio from one voice to another
260
308
  - **[Speech-to-Text API](docs/SPEECH_TO_TEXT.md)** - Transcribe audio and video files
309
+ - **[Text-to-Dialogue API](docs/TEXT_TO_DIALOGUE.md)** - Multi-speaker conversations
310
+ - **[Text-to-Dialogue Streaming](docs/TEXT_TO_DIALOGUE_STREAMING.md)** - Real-time dialogue generation
311
+ - **[Voice Design API](docs/TEXT_TO_VOICE.md)** - Design and create custom voices from text descriptions
312
+ - **[Voice Management API](docs/VOICES.md)** - Manage individual voices (CRUD operations)
261
313
  - **[Audio Isolation API](docs/AUDIO_ISOLATION.md)** - Remove background noise from audio
262
- - **[Audio Native API](docs/AUDIO_NATIVE.md)** - Create embeddable audio players
263
- - **[Forced Alignment API](docs/FORCED_ALIGNMENT.md)** - Get precise timing information
264
- - **[Admin APIs](docs/admin/README.md)** - Complete administrative functionality:
265
- - **[User Management](docs/admin/USER.md)** - Account information and subscription details
266
- - **[Usage Analytics](docs/admin/USAGE.md)** - Character usage monitoring and analytics
267
- - **[History Management](docs/admin/HISTORY.md)** - Generated audio history management
268
- - **[Voice Library](docs/admin/VOICE_LIBRARY.md)** - Community voice browsing and management
269
- - **[Models API](docs/admin/MODELS.md)** - List available models and capabilities
314
+ - **[Forced Alignment API](docs/FORCED_ALIGNMENT.md)** - Get precise timing information for transcripts
315
+
316
+ ### 🎬 **Content Creation APIs**
317
+ - **[Dubbing API](docs/DUBBING.md)** - Create dubbed versions of audio/video content
318
+ - **[Sound Generation API](docs/SOUND_GENERATION.md)** - AI-generated sound effects and ambient audio
319
+ - **[Music Generation API](docs/MUSIC.md)** - AI-powered music composition and streaming
320
+ - **[Audio Native API](docs/AUDIO_NATIVE.md)** - Create embeddable audio players for websites
321
+
322
+ ### 🤖 **Agents Platform APIs** (Conversational AI)
323
+ - **[Agents Platform Overview](docs/agents_platform/README.md)** - Complete conversational AI platform
324
+ - **[Agents API](docs/agents_platform/AGENTS.md)** - Create and manage AI conversational agents
325
+ - **[Conversations API](docs/agents_platform/CONVERSATIONS.md)** - Handle real-time conversations and chat interactions
326
+ - **[Knowledge Base API](docs/agents_platform/KNOWLEDGE_BASE.md)** - Upload and manage documents for agent knowledge
327
+ - **[Tools API](docs/agents_platform/TOOLS.md)** - Define and manage tools that agents can use
328
+ - **[Tests API](docs/agents_platform/TESTS.md)** - Create and run tests for agent performance
329
+ - **[Test Invocations API](docs/agents_platform/TEST_INVOCATIONS.md)** - Execute and monitor test runs
330
+ - **[Outbound Calling API](docs/agents_platform/OUTBOUND_CALLING.md)** - Make automated phone calls with agents
331
+ - **[Batch Calling API](docs/agents_platform/BATCH_CALLING.md)** - Execute large-scale calling campaigns
332
+ - **[Phone Numbers API](docs/agents_platform/PHONE_NUMBERS.md)** - Manage phone numbers for voice agents
333
+ - **[Widgets API](docs/agents_platform/WIDGETS.md)** - Create embeddable chat widgets for websites
334
+ - **[LLM Usage API](docs/agents_platform/LLM_USAGE.md)** - Monitor and analyze language model usage
335
+ - **[MCP Servers API](docs/agents_platform/MCP_SERVERS.md)** - Manage Model Context Protocol servers
336
+ - **[Workspace API](docs/agents_platform/WORKSPACE.md)** - Manage agent platform workspace settings
337
+
338
+ ### 📊 **Admin & Management APIs**
339
+ - **[Admin APIs Overview](docs/admin/README.md)** - Complete administrative functionality
340
+ - **[User Management](docs/admin/USER.md)** - Account information and subscription details
341
+ - **[Usage Analytics](docs/admin/USAGE.md)** - Character usage monitoring and analytics
342
+ - **[History Management](docs/admin/HISTORY.md)** - Generated audio history management
343
+ - **[Voice Library](docs/admin/VOICE_LIBRARY.md)** - Community voice browsing and management
344
+ - **[Models API](docs/admin/MODELS.md)** - List available models and capabilities
345
+ - **[Samples Management](docs/admin/SAMPLES.md)** - Delete voice samples for content moderation
346
+ - **[Service Accounts](docs/admin/SERVICE_ACCOUNTS.md)** - Monitor and manage service accounts
347
+ - **[Service Account API Keys](docs/admin/SERVICE_ACCOUNT_API_KEYS.md)** - Manage API keys for service accounts
348
+ - **[Webhooks Management](docs/admin/WEBHOOKS.md)** - Monitor workspace webhooks and their health
349
+ - **[Workspace Webhooks](docs/admin/WORKSPACE_WEBHOOKS.md)** - Configure and manage workspace-level webhooks
350
+ - **[Workspace Groups](docs/admin/WORKSPACE_GROUPS.md)** - Manage user groups and members
351
+ - **[Workspace Invites](docs/admin/WORKSPACE_INVITES.md)** - Invite users and revoke invitations
352
+ - **[Workspace Members](docs/admin/WORKSPACE_MEMBERS.md)** - Update member attributes and roles
353
+ - **[Workspace Resources](docs/admin/WORKSPACE_RESOURCES.md)** - Share/unshare resources across the workspace
354
+ - **[Pronunciation Dictionaries](docs/admin/PRONUNCIATION_DICTIONARIES.md)** - Create, manage and download pronunciation dictionaries
355
+
356
+ ### 🔧 **Advanced Features**
357
+ - **[WebSocket Streaming](docs/WEBSOCKET_STREAMING.md)** - Real-time audio streaming with WebSockets
270
358
 
271
359
  ### Available Endpoints
272
360
 
@@ -290,6 +378,14 @@ end
290
378
  | `client.history.*` | Generated audio history management | [HISTORY.md](docs/admin/HISTORY.md) |
291
379
  | `client.voice_library.*` | Community voice browsing and management | [VOICE_LIBRARY.md](docs/admin/VOICE_LIBRARY.md) |
292
380
  | `client.models.*` | Model information and capabilities | [MODELS.md](docs/admin/MODELS.md) |
381
+ | `client.workspace_groups.*` | Workspace user groups management | [WORKSPACE_GROUPS.md](docs/admin/WORKSPACE_GROUPS.md) |
382
+ | `client.workspace_invites.*` | Workspace invites management | [WORKSPACE_INVITES.md](docs/admin/WORKSPACE_INVITES.md) |
383
+ | `client.workspace_members.*` | Workspace member management | [WORKSPACE_MEMBERS.md](docs/admin/WORKSPACE_MEMBERS.md) |
384
+ | `client.workspace_resources.*` | Workspace resource sharing | [WORKSPACE_RESOURCES.md](docs/admin/WORKSPACE_RESOURCES.md) |
385
+ | `client.pronunciation_dictionaries.*` | Manage pronunciation dictionaries | [PRONUNCIATION_DICTIONARIES.md](docs/admin/PRONUNCIATION_DICTIONARIES.md) |
386
+ | `client.samples.*` | Voice sample deletion and content moderation | [SAMPLES.md](docs/admin/SAMPLES.md) |
387
+ | `client.service_accounts.*` | Service account monitoring and management | [SERVICE_ACCOUNTS.md](docs/admin/SERVICE_ACCOUNTS.md) |
388
+ | `client.webhooks.*` | Workspace webhook monitoring and health analysis | [WEBHOOKS.md](docs/admin/WEBHOOKS.md) |
293
389
 
294
390
  ## Configuration Options
295
391
 
@@ -343,27 +439,54 @@ end
343
439
 
344
440
  ## Rails Integration
345
441
 
346
- The gem is designed to work seamlessly with Rails applications. See the [examples](examples/) directory for complete controller implementations:
347
-
348
- - [DubsController](examples/dubs_controller.rb) - Complete dubbing workflow
349
- - [TextToSpeechController](examples/text_to_speech_controller.rb) - TTS with error handling
350
- - [StreamingAudioController](examples/streaming_audio_controller.rb) - Real-time streaming
351
- - [TextToDialogueController](examples/text_to_dialogue_controller.rb) - Dialogue generation
352
- - [SoundGenerationController](examples/sound_generation_controller.rb) - Sound effects
353
- - [MusicController](examples/music_controller.rb) - AI music composition and streaming
354
- - [TextToVoiceController](examples/text_to_voice_controller.rb) - Voice design and creation
355
- - [VoicesController](examples/voices_controller.rb) - Voice management (CRUD operations)
356
- - [SpeechToSpeechController](examples/speech_to_speech_controller.rb) - Voice changer and audio transformation
357
- - [SpeechToTextController](examples/speech_to_text_controller.rb) - Audio/video transcription with advanced features
358
- - [AudioIsolationController](examples/audio_isolation_controller.rb) - Background noise removal and audio cleanup
359
- - [AudioNativeController](examples/audio_native_controller.rb) - Embeddable audio players for websites
360
- - [ForcedAlignmentController](examples/forced_alignment_controller.rb) - Audio-text timing alignment and subtitle generation
442
+ The gem is designed to work seamlessly with Rails applications. See the [examples](examples/) directory for complete controller implementations and the [Rails initializer example](examples/rails_initializer.rb) for configuration setup:
443
+
444
+ - **Core Controllers**
445
+ - [DubsController](examples/dubs_controller.rb) - Complete dubbing workflow
446
+ - [TextToSpeechController](examples/text_to_speech_controller.rb) - TTS with error handling
447
+ - [StreamingAudioController](examples/streaming_audio_controller.rb) - Real-time streaming
448
+ - [TextToDialogueController](examples/text_to_dialogue_controller.rb) - Dialogue generation
449
+ - [SoundGenerationController](examples/sound_generation_controller.rb) - Sound effects
450
+ - [MusicController](examples/music_controller.rb) - AI music composition and streaming
451
+ - [TextToVoiceController](examples/text_to_voice_controller.rb) - Voice design and creation
452
+ - [VoicesController](examples/voices_controller.rb) - Voice management (CRUD operations)
453
+ - [SpeechToSpeechController](examples/speech_to_speech_controller.rb) - Voice changer and audio transformation
454
+ - [SpeechToTextController](examples/speech_to_text_controller.rb) - Audio/video transcription with advanced features
455
+ - [AudioIsolationController](examples/audio_isolation_controller.rb) - Background noise removal and audio cleanup
456
+ - [AudioNativeController](examples/audio_native_controller.rb) - Embeddable audio players for websites
457
+ - [ForcedAlignmentController](examples/forced_alignment_controller.rb) - Audio-text timing alignment and subtitle generation
458
+
361
459
  - **Admin Controllers** - Complete administrative functionality:
362
460
  - [Admin::HistoryController](examples/admin/history_controller.rb) - Generated audio history management and analytics
363
461
  - [Admin::UsageController](examples/admin/usage_controller.rb) - Character usage monitoring and analytics
364
462
  - [Admin::UserController](examples/admin/user_controller.rb) - User account and subscription management
365
463
  - [Admin::VoiceLibraryController](examples/admin/voice_library_controller.rb) - Community voice browsing and management
366
464
  - [Admin::ModelsController](examples/admin/models_controller.rb) - Model information and selection guidance
465
+ - [Admin::SamplesController](examples/admin/samples_controller.rb) - Voice sample deletion and content moderation
466
+ - [Admin::ServiceAccountsController](examples/admin/service_accounts_controller.rb) - Service account monitoring and analytics
467
+ - [Admin::ServiceAccountApiKeysController](examples/admin/service_account_api_keys_controller.rb) - API key management for service accounts
468
+ - [Admin::WebhooksController](examples/admin/webhooks_controller.rb) - Workspace webhook monitoring and health analysis
469
+ - [Admin::WorkspaceWebhooksController](examples/admin/workspace_webhooks_controller.rb) - Workspace-level webhook configuration
470
+ - [Admin::WorkspaceGroupsController](examples/admin/workspace_groups_controller.rb) - User group management and permissions
471
+ - [Admin::WorkspaceInvitesController](examples/admin/workspace_invites_controller.rb) - Workspace invitation management
472
+ - [Admin::WorkspaceMembersController](examples/admin/workspace_members_controller.rb) - Workspace member management and roles
473
+ - [Admin::WorkspaceResourcesController](examples/admin/workspace_resources_controller.rb) - Resource sharing and permissions
474
+ - [Admin::PronunciationDictionariesController](examples/admin/pronunciation_dictionaries_controller.rb) - Custom pronunciation management
475
+
476
+ - **Agents Platform Controllers** - Conversational AI functionality:
477
+ - [AgentsPlatform::AgentsController](examples/agents_platform/agents_controller.rb) - AI agent creation and management
478
+ - [AgentsPlatform::ConversationsController](examples/agents_platform/conversations_controller.rb) - Real-time conversation handling
479
+ - [AgentsPlatform::KnowledgeBaseController](examples/agents_platform/knowledge_base_controller.rb) - Document and knowledge management
480
+ - [AgentsPlatform::ToolsController](examples/agents_platform/tools_controller.rb) - Agent tool management and configuration
481
+ - [AgentsPlatform::TestsController](examples/agents_platform/tests_controller.rb) - Agent testing and validation
482
+ - [AgentsPlatform::TestInvocationsController](examples/agents_platform/test_invocations_controller.rb) - Test execution and monitoring
483
+ - [AgentsPlatform::OutboundCallingController](examples/agents_platform/outbound_calling_controller.rb) - Automated phone call management
484
+ - [AgentsPlatform::BatchCallingController](examples/agents_platform/batch_calling_controller.rb) - Large-scale calling campaigns
485
+ - [AgentsPlatform::PhoneNumbersController](examples/agents_platform/phone_numbers_controller.rb) - Phone number management for agents
486
+ - [AgentsPlatform::WidgetsController](examples/agents_platform/widgets_controller.rb) - Embeddable chat widget management
487
+ - [AgentsPlatform::LlmUsageController](examples/agents_platform/llm_usage_controller.rb) - Language model usage analytics
488
+ - [AgentsPlatform::McpServersController](examples/agents_platform/mcp_servers_controller.rb) - Model Context Protocol server management
489
+ - [AgentsPlatform::WorkspaceController](examples/agents_platform/workspace_controller.rb) - Agent platform workspace settings
367
490
 
368
491
  ## Development
369
492