dv-pipecat-ai 0.0.85.dev698__py3-none-any.whl → 0.0.85.dev814__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.

Files changed (45) hide show
  1. {dv_pipecat_ai-0.0.85.dev698.dist-info → dv_pipecat_ai-0.0.85.dev814.dist-info}/METADATA +23 -18
  2. {dv_pipecat_ai-0.0.85.dev698.dist-info → dv_pipecat_ai-0.0.85.dev814.dist-info}/RECORD +45 -43
  3. pipecat/adapters/services/aws_nova_sonic_adapter.py +116 -6
  4. pipecat/pipeline/runner.py +6 -2
  5. pipecat/pipeline/task.py +40 -55
  6. pipecat/processors/aggregators/llm_context.py +40 -2
  7. pipecat/processors/frameworks/rtvi.py +1 -0
  8. pipecat/runner/daily.py +59 -20
  9. pipecat/runner/run.py +149 -67
  10. pipecat/runner/types.py +5 -5
  11. pipecat/services/assemblyai/models.py +6 -0
  12. pipecat/services/assemblyai/stt.py +13 -5
  13. pipecat/services/asyncai/tts.py +3 -0
  14. pipecat/services/aws/llm.py +33 -16
  15. pipecat/services/aws/nova_sonic/context.py +69 -0
  16. pipecat/services/aws/nova_sonic/llm.py +199 -89
  17. pipecat/services/aws/stt.py +2 -0
  18. pipecat/services/aws_nova_sonic/context.py +8 -12
  19. pipecat/services/cartesia/stt.py +77 -70
  20. pipecat/services/cartesia/tts.py +3 -1
  21. pipecat/services/deepgram/flux/stt.py +4 -0
  22. pipecat/services/elevenlabs/tts.py +82 -41
  23. pipecat/services/fish/tts.py +3 -0
  24. pipecat/services/google/stt.py +4 -0
  25. pipecat/services/lmnt/tts.py +2 -0
  26. pipecat/services/neuphonic/tts.py +3 -0
  27. pipecat/services/openai/tts.py +37 -6
  28. pipecat/services/piper/tts.py +7 -9
  29. pipecat/services/playht/tts.py +3 -0
  30. pipecat/services/rime/tts.py +9 -8
  31. pipecat/services/riva/stt.py +3 -1
  32. pipecat/services/salesforce/__init__.py +9 -0
  33. pipecat/services/salesforce/llm.py +465 -0
  34. pipecat/services/sarvam/tts.py +87 -10
  35. pipecat/services/speechmatics/stt.py +3 -1
  36. pipecat/services/stt_service.py +23 -10
  37. pipecat/services/tts_service.py +64 -13
  38. pipecat/transports/base_input.py +3 -0
  39. pipecat/transports/base_output.py +71 -77
  40. pipecat/transports/smallwebrtc/connection.py +5 -0
  41. pipecat/transports/smallwebrtc/request_handler.py +42 -0
  42. pipecat/utils/string.py +1 -0
  43. {dv_pipecat_ai-0.0.85.dev698.dist-info → dv_pipecat_ai-0.0.85.dev814.dist-info}/WHEEL +0 -0
  44. {dv_pipecat_ai-0.0.85.dev698.dist-info → dv_pipecat_ai-0.0.85.dev814.dist-info}/licenses/LICENSE +0 -0
  45. {dv_pipecat_ai-0.0.85.dev698.dist-info → dv_pipecat_ai-0.0.85.dev814.dist-info}/top_level.txt +0 -0
@@ -14,6 +14,7 @@ from dataclasses import dataclass
14
14
  from enum import Enum
15
15
  from typing import Any, Awaitable, Callable, Dict, List, Optional
16
16
 
17
+ from aiortc.sdp import candidate_from_sdp
17
18
  from fastapi import HTTPException
18
19
  from loguru import logger
19
20
 
@@ -39,6 +40,34 @@ class SmallWebRTCRequest:
39
40
  request_data: Optional[Any] = None
40
41
 
41
42
 
43
+ @dataclass
44
+ class IceCandidate:
45
+ """The remote ice candidate object received from the peer connection.
46
+
47
+ Parameters:
48
+ candidate: The ice candidate patch SDP string (Session Description Protocol).
49
+ sdp_mid: The SDP mid for the candidate patch.
50
+ sdp_mline_index: The SDP mline index for the candidate patch.
51
+ """
52
+
53
+ candidate: str
54
+ sdp_mid: str
55
+ sdp_mline_index: int
56
+
57
+
58
+ @dataclass
59
+ class SmallWebRTCPatchRequest:
60
+ """Small WebRTC transport session arguments for the runner.
61
+
62
+ Parameters:
63
+ pc_id: Identifier for the peer connection.
64
+ candidates: A list of ICE candidate patches.
65
+ """
66
+
67
+ pc_id: str
68
+ candidates: List[IceCandidate]
69
+
70
+
42
71
  class ConnectionMode(Enum):
43
72
  """Enum defining the connection handling modes."""
44
73
 
@@ -197,6 +226,19 @@ class SmallWebRTCRequestHandler:
197
226
  logger.debug(f"SmallWebRTC request details: {request}")
198
227
  raise
199
228
 
229
+ async def handle_patch_request(self, request: SmallWebRTCPatchRequest):
230
+ """Handle a SmallWebRTC patch candidate request."""
231
+ peer_connection = self._pcs_map.get(request.pc_id)
232
+
233
+ if not peer_connection:
234
+ raise HTTPException(status_code=404, detail="Peer connection not found")
235
+
236
+ for c in request.candidates:
237
+ candidate = candidate_from_sdp(c.candidate)
238
+ candidate.sdpMid = c.sdp_mid
239
+ candidate.sdpMLineIndex = c.sdp_mline_index
240
+ await peer_connection.add_ice_candidate(candidate)
241
+
200
242
  async def close(self):
201
243
  """Clear the connection map."""
202
244
  coros = [pc.disconnect() for pc in self._pcs_map.values()]
pipecat/utils/string.py CHANGED
@@ -47,6 +47,7 @@ SENTENCE_ENDING_PUNCTUATION: FrozenSet[str] = frozenset(
47
47
  "!",
48
48
  "?",
49
49
  ";",
50
+ "…",
50
51
  # East Asian punctuation (Chinese (Traditional & Simplified), Japanese, Korean)
51
52
  "。", # Ideographic full stop
52
53
  "?", # Full-width question mark