dv-pipecat-ai 0.0.82.dev49__py3-none-any.whl → 0.0.82.dev57__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.
Potentially problematic release.
This version of dv-pipecat-ai might be problematic. Click here for more details.
- {dv_pipecat_ai-0.0.82.dev49.dist-info → dv_pipecat_ai-0.0.82.dev57.dist-info}/METADATA +1 -1
- {dv_pipecat_ai-0.0.82.dev49.dist-info → dv_pipecat_ai-0.0.82.dev57.dist-info}/RECORD +7 -6
- pipecat/pipeline/tts_switcher.py +30 -0
- pipecat/services/sarvam/tts.py +13 -1
- {dv_pipecat_ai-0.0.82.dev49.dist-info → dv_pipecat_ai-0.0.82.dev57.dist-info}/WHEEL +0 -0
- {dv_pipecat_ai-0.0.82.dev49.dist-info → dv_pipecat_ai-0.0.82.dev57.dist-info}/licenses/LICENSE +0 -0
- {dv_pipecat_ai-0.0.82.dev49.dist-info → dv_pipecat_ai-0.0.82.dev57.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
dv_pipecat_ai-0.0.82.
|
|
1
|
+
dv_pipecat_ai-0.0.82.dev57.dist-info/licenses/LICENSE,sha256=DWY2QGf2eMCFhuu2ChairtT6CB7BEFffNVhXWc4Od08,1301
|
|
2
2
|
pipecat/__init__.py,sha256=j0Xm6adxHhd7D06dIyyPV_GlBYLlBnTAERVvD_jAARQ,861
|
|
3
3
|
pipecat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
pipecat/adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -97,6 +97,7 @@ pipecat/pipeline/service_switcher.py,sha256=GjqtBtMSyKa0XtjYa1_requMztPRQsbWDPyZ
|
|
|
97
97
|
pipecat/pipeline/sync_parallel_pipeline.py,sha256=dZ17GoY2q8cHwNr9zPOM-TdiC4ERe9oGEkMEV9-YDtI,10654
|
|
98
98
|
pipecat/pipeline/task.py,sha256=s87JozSQvdB2sLQs9fSuiEXvB62NxZn_rqY-XFbtrwo,34110
|
|
99
99
|
pipecat/pipeline/task_observer.py,sha256=DswTNgdV1bS9buKNt-E5T5vNptffhjeqoD75YNmP1GQ,6835
|
|
100
|
+
pipecat/pipeline/tts_switcher.py,sha256=hyGFVRbDQfaIaeIzyVkUHA3sgAFpsdkRBMId_cZJ-gM,1067
|
|
100
101
|
pipecat/pipeline/to_be_updated/merge_pipeline.py,sha256=jLEWdufIW3z1xZhdoLowdJ_SGz018DQw8JYGwlBYvE4,1845
|
|
101
102
|
pipecat/processors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
102
103
|
pipecat/processors/async_generator.py,sha256=qPOZxk5eOad_NrF_Z06vWZ6deXIxb9AKZKYO2e5pkJs,2385
|
|
@@ -289,7 +290,7 @@ pipecat/services/sambanova/__init__.py,sha256=oTXExLic-qTcsfsiWmssf3Elclf3IIWoN4
|
|
|
289
290
|
pipecat/services/sambanova/llm.py,sha256=5XVfPLEk__W8ykFqLdV95ZUhlGGkAaJwmbciLdZYtTc,8976
|
|
290
291
|
pipecat/services/sambanova/stt.py,sha256=ZZgEZ7WQjLFHbCko-3LNTtVajjtfUvbtVLtFcaNadVQ,2536
|
|
291
292
|
pipecat/services/sarvam/__init__.py,sha256=rfHd18ccf-oCytmkKFSyZ1tV-FWglM1D-iKNkA2_sxc,110
|
|
292
|
-
pipecat/services/sarvam/tts.py,sha256=
|
|
293
|
+
pipecat/services/sarvam/tts.py,sha256=K-AtWE1Q0ZZwshLP-7sCDmOSIWhuKOj91BCCE4N9XAk,25010
|
|
293
294
|
pipecat/services/simli/__init__.py,sha256=cbDcqOaGsEgKbGYKpJ1Vv7LN4ZjOWA04sE84WW5vgQI,257
|
|
294
295
|
pipecat/services/simli/video.py,sha256=fVMYsCE5epH9rTdhN_tyPPJw7W6TCMHCOe2akKHWduw,8330
|
|
295
296
|
pipecat/services/soniox/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -376,7 +377,7 @@ pipecat/utils/tracing/service_decorators.py,sha256=HwDCqLGijhYD3F8nxDuQmEw-YkRw0
|
|
|
376
377
|
pipecat/utils/tracing/setup.py,sha256=7TEgPNpq6M8lww8OQvf0P9FzYc5A30xICGklVA-fua0,2892
|
|
377
378
|
pipecat/utils/tracing/turn_context_provider.py,sha256=ikon3plFOx0XbMrH6DdeHttNpb-U0gzMZIm3bWLc9eI,2485
|
|
378
379
|
pipecat/utils/tracing/turn_trace_observer.py,sha256=dma16SBJpYSOE58YDWy89QzHyQFc_9gQZszKeWixuwc,9725
|
|
379
|
-
dv_pipecat_ai-0.0.82.
|
|
380
|
-
dv_pipecat_ai-0.0.82.
|
|
381
|
-
dv_pipecat_ai-0.0.82.
|
|
382
|
-
dv_pipecat_ai-0.0.82.
|
|
380
|
+
dv_pipecat_ai-0.0.82.dev57.dist-info/METADATA,sha256=vL7W8meXlMu0sXMM0SHsFqXu0M-hfyEQcfd9tJpRGIk,32638
|
|
381
|
+
dv_pipecat_ai-0.0.82.dev57.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
382
|
+
dv_pipecat_ai-0.0.82.dev57.dist-info/top_level.txt,sha256=kQzG20CxGf-nSsHmtXHx3hY2-8zHA3jYg8jk0TajqXc,8
|
|
383
|
+
dv_pipecat_ai-0.0.82.dev57.dist-info/RECORD,,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright (c) 2025, Daily
|
|
3
|
+
#
|
|
4
|
+
# SPDX-License-Identifier: BSD 2-Clause License
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
"""TTS switcher for switching between different TTS services at runtime, with different switching strategies."""
|
|
8
|
+
|
|
9
|
+
from typing import List, Optional, Type
|
|
10
|
+
|
|
11
|
+
from pipecat.pipeline.service_switcher import ServiceSwitcher, StrategyType
|
|
12
|
+
from pipecat.services.tts_service import TTSService
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class TTSSwitcher(ServiceSwitcher[StrategyType]):
|
|
16
|
+
"""A pipeline that switches between different TTS services at runtime."""
|
|
17
|
+
|
|
18
|
+
def __init__(self, tts_services: List[TTSService], strategy_type: Type[StrategyType]):
|
|
19
|
+
"""Initialize the TTS switcher with a list of TTS services and a switching strategy."""
|
|
20
|
+
super().__init__(tts_services, strategy_type)
|
|
21
|
+
|
|
22
|
+
@property
|
|
23
|
+
def tts_services(self) -> List[TTSService]:
|
|
24
|
+
"""Get the list of TTS services managed by this switcher."""
|
|
25
|
+
return self.services
|
|
26
|
+
|
|
27
|
+
@property
|
|
28
|
+
def active_tts(self) -> Optional[TTSService]:
|
|
29
|
+
"""Get the currently active TTS service, if any."""
|
|
30
|
+
return self.strategy.active_service
|
pipecat/services/sarvam/tts.py
CHANGED
|
@@ -605,8 +605,15 @@ class SarvamTTSService(InterruptibleTTSService):
|
|
|
605
605
|
logger.warning("Service is disconnecting, ignoring text send")
|
|
606
606
|
return
|
|
607
607
|
|
|
608
|
+
# Validate text input
|
|
609
|
+
if not text or not isinstance(text, str) or not text.strip():
|
|
610
|
+
logger.warning(f"Invalid text input for Sarvam TTS: {repr(text)}")
|
|
611
|
+
return
|
|
612
|
+
|
|
608
613
|
if self._websocket and self._websocket.state == State.OPEN:
|
|
609
|
-
msg = {"type": "text", "data": {"text": text}}
|
|
614
|
+
msg = {"type": "text", "data": {"text": text.strip()}}
|
|
615
|
+
logger.info(f"Sarvam TTS: Sending text message: {repr(text.strip())}")
|
|
616
|
+
logger.debug(f"Sarvam TTS: Full message payload: {msg}")
|
|
610
617
|
await self._websocket.send(json.dumps(msg))
|
|
611
618
|
else:
|
|
612
619
|
logger.warning("WebSocket not ready, cannot send text")
|
|
@@ -625,6 +632,11 @@ class SarvamTTSService(InterruptibleTTSService):
|
|
|
625
632
|
"""
|
|
626
633
|
logger.debug(f"Generating TTS: [{text}]")
|
|
627
634
|
|
|
635
|
+
# Validate text input
|
|
636
|
+
if not text or not isinstance(text, str) or not text.strip():
|
|
637
|
+
logger.warning(f"Invalid text input for Sarvam TTS run_tts: {repr(text)}")
|
|
638
|
+
return
|
|
639
|
+
|
|
628
640
|
try:
|
|
629
641
|
if not self._websocket or self._websocket.state is State.CLOSED:
|
|
630
642
|
await self._connect()
|
|
File without changes
|
{dv_pipecat_ai-0.0.82.dev49.dist-info → dv_pipecat_ai-0.0.82.dev57.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|