livekit-plugins-hume 1.2.1__tar.gz → 1.2.2__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 livekit-plugins-hume might be problematic. Click here for more details.

@@ -169,4 +169,7 @@ node_modules
169
169
 
170
170
  credentials.json
171
171
  pyrightconfig.json
172
- docs/
172
+ docs/
173
+
174
+ # Database files
175
+ *.db
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: livekit-plugins-hume
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: Hume TTS plugin for LiveKit agents
5
5
  Project-URL: Documentation, https://docs.livekit.io
6
6
  Project-URL: Website, https://livekit.io/
@@ -17,7 +17,7 @@ Classifier: Topic :: Multimedia :: Sound/Audio
17
17
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
18
18
  Requires-Python: >=3.9.0
19
19
  Requires-Dist: aiohttp>=3.8.0
20
- Requires-Dist: livekit-agents>=1.2.1
20
+ Requires-Dist: livekit-agents>=1.2.2
21
21
  Description-Content-Type: text/markdown
22
22
 
23
23
  # Hume AI TTS plugin for LiveKit Agents
@@ -24,7 +24,14 @@ from typing import Any, TypedDict
24
24
 
25
25
  import aiohttp
26
26
 
27
- from livekit.agents import APIConnectionError, APIConnectOptions, APITimeoutError, tts, utils
27
+ from livekit.agents import (
28
+ APIConnectionError,
29
+ APIConnectOptions,
30
+ APIError,
31
+ APITimeoutError,
32
+ tts,
33
+ utils,
34
+ )
28
35
  from livekit.agents.types import DEFAULT_API_CONNECT_OPTIONS, NOT_GIVEN, NotGivenOr
29
36
  from livekit.agents.utils import is_given
30
37
 
@@ -265,6 +272,9 @@ class ChunkedStream(tts.ChunkedStream):
265
272
  continue
266
273
 
267
274
  data = json.loads(line.decode())
275
+ if data.get("type") == "error":
276
+ raise APIError(message=str(data))
277
+
268
278
  audio_b64 = data.get("audio")
269
279
  if audio_b64:
270
280
  output_emitter.push(base64.b64decode(audio_b64))
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- __version__ = "1.2.1"
15
+ __version__ = "1.2.2"
@@ -24,7 +24,7 @@ classifiers = [
24
24
  ]
25
25
  dependencies = [
26
26
  "aiohttp>=3.8.0",
27
- "livekit-agents>=1.2.1",
27
+ "livekit-agents>=1.2.2",
28
28
  ]
29
29
 
30
30
  [project.urls]