vision-agents-plugins-kokoro 0.1.11__tar.gz → 0.1.12__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 vision-agents-plugins-kokoro might be problematic. Click here for more details.

@@ -84,3 +84,4 @@ stream-py/
84
84
  # Artifacts / assets
85
85
  *.pt
86
86
  *.kef
87
+ *.onnx
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vision-agents-plugins-kokoro
3
- Version: 0.1.11
3
+ Version: 0.1.12
4
4
  Summary: Kokoro TTS integration for Vision Agents
5
5
  Project-URL: Documentation, https://visionagents.ai/
6
6
  Project-URL: Website, https://visionagents.ai/
@@ -7,7 +7,7 @@ from typing import AsyncIterator, Iterator, List, Optional
7
7
  import numpy as np
8
8
 
9
9
  from vision_agents.core import tts
10
- from vision_agents.core.edge.types import PcmData
10
+ from getstream.video.rtc.track_util import PcmData, AudioFormat
11
11
 
12
12
  try:
13
13
  from kokoro import KPipeline # type: ignore
@@ -15,6 +15,9 @@ except ModuleNotFoundError: # pragma: no cover – mocked during CI
15
15
  KPipeline = None # type: ignore # noqa: N816
16
16
 
17
17
 
18
+ logger = logging.getLogger(__name__)
19
+
20
+
18
21
  class TTS(tts.TTS):
19
22
  """Text-to-Speech plugin backed by the Kokoro-82M model."""
20
23
 
@@ -55,7 +58,10 @@ class TTS(tts.TTS):
55
58
  async def _aiter():
56
59
  for chunk in chunks:
57
60
  yield PcmData.from_bytes(
58
- chunk, sample_rate=self.sample_rate, channels=1, format="s16"
61
+ chunk,
62
+ sample_rate=self.sample_rate,
63
+ channels=1,
64
+ format=AudioFormat.S16,
59
65
  )
60
66
 
61
67
  return _aiter()
@@ -65,7 +71,7 @@ class TTS(tts.TTS):
65
71
  Clears the queue and stops playing audio.
66
72
 
67
73
  """
68
- logging.info("🎤 Kokoro TTS stop requested (no-op)")
74
+ logger.info("🎤 Kokoro TTS stop requested (no-op)")
69
75
 
70
76
  def _generate_chunks(self, text: str):
71
77
  for _gs, _ps, audio in self._pipeline(