videosdk-plugins-elevenlabs 0.0.1__py3-none-any.whl → 0.0.3__py3-none-any.whl
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.
- videosdk/plugins/elevenlabs/tts.py +1 -10
- videosdk/plugins/elevenlabs/version.py +1 -1
- {videosdk_plugins_elevenlabs-0.0.1.dist-info → videosdk_plugins_elevenlabs-0.0.3.dist-info}/METADATA +2 -2
- videosdk_plugins_elevenlabs-0.0.3.dist-info/RECORD +6 -0
- videosdk_plugins_elevenlabs-0.0.1.dist-info/RECORD +0 -6
- {videosdk_plugins_elevenlabs-0.0.1.dist-info → videosdk_plugins_elevenlabs-0.0.3.dist-info}/WHEEL +0 -0
|
@@ -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)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.0.
|
|
1
|
+
__version__ = "0.0.3"
|
{videosdk_plugins_elevenlabs-0.0.1.dist-info → videosdk_plugins_elevenlabs-0.0.3.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: videosdk-plugins-elevenlabs
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Summary: VideoSDK Agent Framework plugin for ElevenLabs
|
|
5
5
|
Author: videosdk
|
|
6
6
|
Keywords: ai,audio,elevenlabs,video,videosdk
|
|
@@ -11,7 +11,7 @@ Classifier: Topic :: Multimedia :: Sound/Audio
|
|
|
11
11
|
Classifier: Topic :: Multimedia :: Video
|
|
12
12
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
13
13
|
Requires-Python: >=3.11
|
|
14
|
-
Requires-Dist: videosdk-agents>=0.0.
|
|
14
|
+
Requires-Dist: videosdk-agents>=0.0.15
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
|
|
17
17
|
VideoSDK ElevenLabs Plugin
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
videosdk/plugins/elevenlabs/__init__.py,sha256=bb7M4MSOIIb0KxrsRvG1JczJNGjQ3n-LBqKJp671HfU,91
|
|
2
|
+
videosdk/plugins/elevenlabs/tts.py,sha256=l51CgdxHPgoR-Q2Q4FmSzD-Hi_Hz0MDSxbDIc8jwPck,7092
|
|
3
|
+
videosdk/plugins/elevenlabs/version.py,sha256=k5tJXhBQJ4l9fKHJ76K5w98zBHoYvNk9r-UNH6eQ2-k,21
|
|
4
|
+
videosdk_plugins_elevenlabs-0.0.3.dist-info/METADATA,sha256=j-KpXkh45CmJkAjh7L_Yro5-mOwVdw57panNJC9YKHg,745
|
|
5
|
+
videosdk_plugins_elevenlabs-0.0.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
6
|
+
videosdk_plugins_elevenlabs-0.0.3.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
videosdk/plugins/elevenlabs/__init__.py,sha256=bb7M4MSOIIb0KxrsRvG1JczJNGjQ3n-LBqKJp671HfU,91
|
|
2
|
-
videosdk/plugins/elevenlabs/tts.py,sha256=mnC9VzIbcGEjiiQEe62IzN4AT2snrn3W52IozdWcrPs,7560
|
|
3
|
-
videosdk/plugins/elevenlabs/version.py,sha256=ugyuFliEqtAwQmH4sTlc16YXKYbFWDmfyk87fErB8-8,21
|
|
4
|
-
videosdk_plugins_elevenlabs-0.0.1.dist-info/METADATA,sha256=o9njPH5h5pdYCTEU99RoN516--kwDdJfECfltgSvZtk,745
|
|
5
|
-
videosdk_plugins_elevenlabs-0.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
6
|
-
videosdk_plugins_elevenlabs-0.0.1.dist-info/RECORD,,
|
{videosdk_plugins_elevenlabs-0.0.1.dist-info → videosdk_plugins_elevenlabs-0.0.3.dist-info}/WHEEL
RENAMED
|
File without changes
|