pipecat-respeecher 0.1.2__py3-none-any.whl → 0.1.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.
pipecat_respeecher/tts.py CHANGED
@@ -11,6 +11,7 @@ import base64
11
11
  import json
12
12
  import uuid
13
13
  from typing import AsyncGenerator, Optional
14
+ import asyncio
14
15
 
15
16
  from loguru import logger
16
17
  from pydantic import BaseModel, TypeAdapter, ValidationError
@@ -349,3 +350,16 @@ class RespeecherTTSService(AudioContextTTSService, TTSService):
349
350
  yield None
350
351
  except Exception as e:
351
352
  yield ErrorFrame(error=f"{self} exception: {e}")
353
+
354
+ async def _handle_audio_context(self, context_id: str):
355
+ queue = self._contexts[context_id]
356
+ running = True
357
+ while running:
358
+ try:
359
+ frame = await asyncio.wait_for(queue.get(), timeout=10)
360
+ if frame:
361
+ await self.push_frame(frame)
362
+ running = frame is not None
363
+ except asyncio.TimeoutError:
364
+ logger.trace(f"{self} time out on audio context {context_id}")
365
+ break
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pipecat-respeecher
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Respeecher real-time TTS plugin for Pipecat
5
5
  Author-email: Respeecher <nv@respeecher.com>
6
6
  Maintainer-email: Respeecher <nv@respeecher.com>
@@ -0,0 +1,7 @@
1
+ pipecat_respeecher/__init__.py,sha256=loRRWbx3pIHDPwsDEiGpPHbaTq8afK8PdvKjadGrBgM,167
2
+ pipecat_respeecher/tts.py,sha256=F9Y6ktFKUVSXOxslzHw_ls-oJR5iMCxKT6L17FhnpLY,12236
3
+ pipecat_respeecher-0.1.3.dist-info/licenses/LICENSE,sha256=VYxgaSz1HG1JnJ3NfZybU6fxk5LyvqlpZwzsuzJrThg,1332
4
+ pipecat_respeecher-0.1.3.dist-info/METADATA,sha256=H0eyN_vl6B8a11JrV1XdqggTs6t7Ug_qt-WzQ4Ly-KE,4479
5
+ pipecat_respeecher-0.1.3.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
6
+ pipecat_respeecher-0.1.3.dist-info/top_level.txt,sha256=agL5w1Tg8kRhZcU6wIOz5wjy1L6X2nE8nI5U1XBwYeU,19
7
+ pipecat_respeecher-0.1.3.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- pipecat_respeecher/__init__.py,sha256=loRRWbx3pIHDPwsDEiGpPHbaTq8afK8PdvKjadGrBgM,167
2
- pipecat_respeecher/tts.py,sha256=Do8KCjK6vQBPHfSMhNXPCe33IxRLhVBoD79eBvkJnc8,11721
3
- pipecat_respeecher-0.1.2.dist-info/licenses/LICENSE,sha256=VYxgaSz1HG1JnJ3NfZybU6fxk5LyvqlpZwzsuzJrThg,1332
4
- pipecat_respeecher-0.1.2.dist-info/METADATA,sha256=E41QMUxs0jGdp9dP-4qRK8f_4c4zeKp32E9kgoMDuPc,4479
5
- pipecat_respeecher-0.1.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
6
- pipecat_respeecher-0.1.2.dist-info/top_level.txt,sha256=agL5w1Tg8kRhZcU6wIOz5wjy1L6X2nE8nI5U1XBwYeU,19
7
- pipecat_respeecher-0.1.2.dist-info/RECORD,,