videosdk-plugins-resemble 0.0.22__tar.gz → 0.0.23__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-resemble might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: videosdk-plugins-resemble
3
- Version: 0.0.22
3
+ Version: 0.0.23
4
4
  Summary: VideoSDK Agent Framework plugin for Resemble
5
5
  Author: videosdk
6
6
  License-Expression: Apache-2.0
@@ -12,7 +12,7 @@ Classifier: Topic :: Multimedia :: Sound/Audio
12
12
  Classifier: Topic :: Multimedia :: Video
13
13
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
14
14
  Requires-Python: >=3.11
15
- Requires-Dist: videosdk-agents>=0.0.22
15
+ Requires-Dist: videosdk-agents>=0.0.23
16
16
  Description-Content-Type: text/markdown
17
17
 
18
18
  # VideoSDK Resemble Plugin
@@ -21,7 +21,7 @@ classifiers = [
21
21
  "Topic :: Scientific/Engineering :: Artificial Intelligence",
22
22
  ]
23
23
  dependencies = [
24
- "videosdk-agents>=0.0.22"
24
+ "videosdk-agents>=0.0.23"
25
25
  ]
26
26
 
27
27
  [tool.hatch.version]
@@ -33,11 +33,16 @@ class ResembleTTS(TTS):
33
33
 
34
34
  self.audio_track = None
35
35
  self.loop = None
36
+ self._first_chunk_sent = False
36
37
  self._http_client = httpx.AsyncClient(
37
38
  timeout=httpx.Timeout(connect=15.0, read=30.0, write=5.0, pool=5.0),
38
39
  follow_redirects=True,
39
40
  )
40
41
 
42
+ def reset_first_audio_tracking(self) -> None:
43
+ """Reset the first audio tracking state for next TTS task"""
44
+ self._first_chunk_sent = False
45
+
41
46
  async def synthesize(
42
47
  self,
43
48
  text: AsyncIterator[str] | str,
@@ -117,6 +122,10 @@ class ResembleTTS(TTS):
117
122
  chunk += b'\x00' * padding_needed
118
123
 
119
124
  if len(chunk) == chunk_size:
125
+ if not self._first_chunk_sent and self._first_audio_callback:
126
+ self._first_chunk_sent = True
127
+ await self._first_audio_callback()
128
+
120
129
  self.loop.create_task(self.audio_track.add_new_bytes(chunk))
121
130
  await asyncio.sleep(0.001)
122
131
 
@@ -0,0 +1 @@
1
+ __version__ = "0.0.23"
@@ -1 +0,0 @@
1
- __version__ = "0.0.22"