videosdk-plugins-elevenlabs 0.0.2__tar.gz → 0.0.16__tar.gz

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.

Potentially problematic release.


This version of videosdk-plugins-elevenlabs might be problematic. Click here for more details.

@@ -0,0 +1,18 @@
1
+ myenv/
2
+ venv/
3
+ env/
4
+ __pycache__/
5
+
6
+ .env
7
+ .env.local
8
+ test_env/
9
+ dist/
10
+ .DS_Store
11
+
12
+ node_modules/
13
+ credentials.json
14
+ .Python
15
+ build/
16
+ eggs/
17
+ sdist/
18
+ wheels/
@@ -1,8 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: videosdk-plugins-elevenlabs
3
- Version: 0.0.2
3
+ Version: 0.0.16
4
4
  Summary: VideoSDK Agent Framework plugin for ElevenLabs
5
5
  Author: videosdk
6
+ License-Expression: Apache-2.0
6
7
  Keywords: ai,audio,elevenlabs,video,videosdk
7
8
  Classifier: Development Status :: 4 - Beta
8
9
  Classifier: Intended Audience :: Developers
@@ -11,7 +12,7 @@ Classifier: Topic :: Multimedia :: Sound/Audio
11
12
  Classifier: Topic :: Multimedia :: Video
12
13
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
13
14
  Requires-Python: >=3.11
14
- Requires-Dist: videosdk-agents>=0.0.12
15
+ Requires-Dist: videosdk-agents>=0.0.16
15
16
  Description-Content-Type: text/markdown
16
17
 
17
18
  VideoSDK ElevenLabs Plugin
@@ -7,6 +7,7 @@ name = "videosdk-plugins-elevenlabs"
7
7
  dynamic = ["version"]
8
8
  description = "VideoSDK Agent Framework plugin for ElevenLabs"
9
9
  readme = "README.md"
10
+ license = "Apache-2.0"
10
11
  requires-python = ">=3.11"
11
12
  authors = [{ name = "videosdk"}]
12
13
  keywords = ["video", "audio", "ai", "videosdk", "elevenlabs"]
@@ -20,7 +21,7 @@ classifiers = [
20
21
  "Topic :: Scientific/Engineering :: Artificial Intelligence",
21
22
  ]
22
23
  dependencies = [
23
- "videosdk-agents>=0.0.12"
24
+ "videosdk-agents>=0.0.16"
24
25
  ]
25
26
 
26
27
  [tool.hatch.version]
@@ -55,7 +55,6 @@ class ElevenLabsTTS(TTS):
55
55
  if not self.api_key:
56
56
  raise ValueError("ElevenLabs API key must be provided either through api_key parameter or ELEVENLABS_API_KEY environment variable")
57
57
 
58
- # Create HTTP session for requests
59
58
  self._session = httpx.AsyncClient(
60
59
  timeout=httpx.Timeout(connect=15.0, read=30.0, write=5.0, pool=5.0),
61
60
  follow_redirects=True,
@@ -68,7 +67,6 @@ class ElevenLabsTTS(TTS):
68
67
  **kwargs: Any,
69
68
  ) -> None:
70
69
  try:
71
- # Convert AsyncIterator to string if needed
72
70
  if isinstance(text, AsyncIterator):
73
71
  full_text = ""
74
72
  async for chunk in text:
@@ -80,7 +78,6 @@ class ElevenLabsTTS(TTS):
80
78
  self.emit("error", "Audio track or event loop not set")
81
79
  return
82
80
 
83
- # Use the provided voice_id or fall back to default
84
81
  target_voice = voice_id or self.voice
85
82
 
86
83
  if self.enable_streaming:
@@ -95,7 +92,6 @@ class ElevenLabsTTS(TTS):
95
92
  """Non-streaming synthesis using the standard API"""
96
93
  url = f"{self.base_url}/text-to-speech/{voice_id}/stream"
97
94
 
98
- # Add output_format as URL parameter for ElevenLabs API
99
95
  params = {
100
96
  "model_id": self.model,
101
97
  "output_format": self.response_format,
@@ -144,7 +140,6 @@ class ElevenLabsTTS(TTS):
144
140
  "output_format": self.response_format,
145
141
  }
146
142
 
147
- # Build WebSocket URL with parameters
148
143
  param_string = "&".join([f"{k}={v}" for k, v in params.items()])
149
144
  full_ws_url = f"{ws_url}?{param_string}"
150
145
 
@@ -153,7 +148,6 @@ class ElevenLabsTTS(TTS):
153
148
  try:
154
149
  async with aiohttp.ClientSession() as session:
155
150
  async with session.ws_connect(full_ws_url, headers=headers) as ws:
156
- # Send initial configuration
157
151
  init_message = {
158
152
  "text": " ",
159
153
  "voice_settings": {
@@ -165,15 +159,12 @@ class ElevenLabsTTS(TTS):
165
159
  }
166
160
  await ws.send_str(json.dumps(init_message))
167
161
 
168
- # Send text data
169
162
  text_message = {"text": f"{text} "}
170
163
  await ws.send_str(json.dumps(text_message))
171
-
172
- # Send end-of-stream marker
164
+
173
165
  eos_message = {"text": ""}
174
166
  await ws.send_str(json.dumps(eos_message))
175
167
 
176
- # Receive and process audio data
177
168
  async for msg in ws:
178
169
  if msg.type == aiohttp.WSMsgType.TEXT:
179
170
  data = json.loads(msg.data)
@@ -0,0 +1 @@
1
+ __version__ = "0.0.16"
@@ -1,10 +0,0 @@
1
- myenv/
2
- venv/
3
- env/
4
- __pycache__
5
-
6
- .env
7
- .env.local
8
- test_env/
9
- dist/
10
- .DS_Store
@@ -1 +0,0 @@
1
- __version__ = "0.0.2"