dv-pipecat-ai 0.0.82.dev59__py3-none-any.whl → 0.0.82.dev61__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dv-pipecat-ai
3
- Version: 0.0.82.dev59
3
+ Version: 0.0.82.dev61
4
4
  Summary: An open source framework for voice (and multimodal) assistants
5
5
  License-Expression: BSD-2-Clause
6
6
  Project-URL: Source, https://github.com/pipecat-ai/pipecat
@@ -1,4 +1,4 @@
1
- dv_pipecat_ai-0.0.82.dev59.dist-info/licenses/LICENSE,sha256=DWY2QGf2eMCFhuu2ChairtT6CB7BEFffNVhXWc4Od08,1301
1
+ dv_pipecat_ai-0.0.82.dev61.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
@@ -74,7 +74,7 @@ pipecat/extensions/voicemail/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
74
74
  pipecat/extensions/voicemail/voicemail_detector.py,sha256=g3L1m3cPJzsadeB5a8WRC9klH0D8m7xfPgB2YEaL6Do,29983
75
75
  pipecat/frames/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
76
76
  pipecat/frames/frames.proto,sha256=JXZm3VXLR8zMOUcOuhVoe2mhM3MQIQGMJXLopdJO_5Y,839
77
- pipecat/frames/frames.py,sha256=EWb91dkJjQB82KZkTt1yKXrfyjMBQ4qwerM6FjwB9_Y,44576
77
+ pipecat/frames/frames.py,sha256=mMXjaMd2dC6ILva3DWL2cyNeLTq8q_kpUs5RiHMCEVw,44812
78
78
  pipecat/frames/protobufs/frames_pb2.py,sha256=VHgGV_W7qQ4sfQK6RHb5_DggLm3PiSYMr6aBZ8_p1cQ,2590
79
79
  pipecat/metrics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
80
80
  pipecat/metrics/metrics.py,sha256=bdZNciEtLTtA-xgoKDz2RJAy6fKrXkTwz3pryVHzc2M,2713
@@ -150,7 +150,7 @@ pipecat/serializers/__init__.py,sha256=xcmbbR7YYU5C4HPbo2WVgPij-Bl_qlrLcnunCdpcZ
150
150
  pipecat/serializers/asterisk.py,sha256=bPuGuLiCf04_H0d9Gc-5BpEtqD9BRNWnpZZq5MZ1fDY,6091
151
151
  pipecat/serializers/base_serializer.py,sha256=OyBUZccs2ZT9mfkBbq2tGsUJMvci6o-j90Cl1sicPaI,2030
152
152
  pipecat/serializers/convox.py,sha256=Irby_iZywgBtevlxiC8nE2GY3eh4yNNRi2YC-0vnNTY,11155
153
- pipecat/serializers/custom.py,sha256=iZ82c3hcissC-r1eLnNeSA0qX0EnC6qEaK6bII3ETMQ,8608
153
+ pipecat/serializers/custom.py,sha256=4askZg5E9UIgJ8dz4bBGQ2t2WsnZST0tsuZcLgcmjhI,9263
154
154
  pipecat/serializers/exotel.py,sha256=U08EQeRzfW6O2P5mKeCjTy1Ur9KoTjVty3MehmVBEC0,5939
155
155
  pipecat/serializers/livekit.py,sha256=caVZlVJGV-SmEXE_H7i3DRo1RvC9FgGCVqi8IYGrpEo,2552
156
156
  pipecat/serializers/plivo.py,sha256=9hJ8gvkVp1_sFx30ELWMJPMQQskwLKWsD49DALzAsRA,9410
@@ -377,7 +377,7 @@ pipecat/utils/tracing/service_decorators.py,sha256=HwDCqLGijhYD3F8nxDuQmEw-YkRw0
377
377
  pipecat/utils/tracing/setup.py,sha256=7TEgPNpq6M8lww8OQvf0P9FzYc5A30xICGklVA-fua0,2892
378
378
  pipecat/utils/tracing/turn_context_provider.py,sha256=ikon3plFOx0XbMrH6DdeHttNpb-U0gzMZIm3bWLc9eI,2485
379
379
  pipecat/utils/tracing/turn_trace_observer.py,sha256=dma16SBJpYSOE58YDWy89QzHyQFc_9gQZszKeWixuwc,9725
380
- dv_pipecat_ai-0.0.82.dev59.dist-info/METADATA,sha256=ZODkP5vN-bSrbzDLUxL3PUT7uXeOmuRsH1PLz6d6tww,32638
381
- dv_pipecat_ai-0.0.82.dev59.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
382
- dv_pipecat_ai-0.0.82.dev59.dist-info/top_level.txt,sha256=kQzG20CxGf-nSsHmtXHx3hY2-8zHA3jYg8jk0TajqXc,8
383
- dv_pipecat_ai-0.0.82.dev59.dist-info/RECORD,,
380
+ dv_pipecat_ai-0.0.82.dev61.dist-info/METADATA,sha256=p-7FXjhZWMMLbzhN87qtv-tbc1kPRwdY8hFCJJcY8dk,32638
381
+ dv_pipecat_ai-0.0.82.dev61.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
382
+ dv_pipecat_ai-0.0.82.dev61.dist-info/top_level.txt,sha256=kQzG20CxGf-nSsHmtXHx3hY2-8zHA3jYg8jk0TajqXc,8
383
+ dv_pipecat_ai-0.0.82.dev61.dist-info/RECORD,,
pipecat/frames/frames.py CHANGED
@@ -1582,6 +1582,17 @@ class WaitForDTMFFrame(ControlFrame):
1582
1582
  pass
1583
1583
 
1584
1584
 
1585
+ @dataclass
1586
+ class CallTransferFrame(ControlFrame):
1587
+ """Frame to request call transfer to another number/destination.
1588
+
1589
+ Parameters:
1590
+ target: The phone number or destination to transfer the call to.
1591
+ """
1592
+
1593
+ target: str
1594
+
1595
+
1585
1596
  @dataclass
1586
1597
  class ManuallySwitchServiceFrame(ServiceSwitcherFrame):
1587
1598
  """A frame to request a manual switch in the active service in a ServiceSwitcher.
@@ -8,6 +8,7 @@
8
8
 
9
9
  import base64
10
10
  import json
11
+ import uuid
11
12
  from typing import Optional
12
13
 
13
14
  from loguru import logger
@@ -22,6 +23,7 @@ from pipecat.audio.utils import (
22
23
  )
23
24
  from pipecat.frames.frames import (
24
25
  AudioRawFrame,
26
+ CallTransferFrame,
25
27
  CancelFrame,
26
28
  EndFrame,
27
29
  Frame,
@@ -45,6 +47,7 @@ class CustomFrameSerializer(FrameSerializer):
45
47
  - start: Initialize call with agent configuration
46
48
  - media: Bidirectional audio streaming
47
49
  - clear: Clear audio buffers (interruption)
50
+ - call_transfer: Transfer call to another number
48
51
  - hang_up: End call notification
49
52
 
50
53
  Audio format:
@@ -123,6 +126,15 @@ class CustomFrameSerializer(FrameSerializer):
123
126
  answer = {"event": "clear", "stream_sid": self._stream_sid}
124
127
  return json.dumps(answer)
125
128
 
129
+ elif isinstance(frame, CallTransferFrame):
130
+ # Send call_transfer event to transfer the call to another number
131
+ answer = {
132
+ "event": "call_transfer",
133
+ "call_sid": self._call_sid or self._stream_sid,
134
+ "to": frame.target,
135
+ }
136
+ return json.dumps(answer)
137
+
126
138
  elif isinstance(frame, (EndFrame, CancelFrame)):
127
139
  # Send hang_up event to end the call
128
140
  answer = {"event": "hang_up", "stream_sid": self._stream_sid}
@@ -153,12 +165,14 @@ class CustomFrameSerializer(FrameSerializer):
153
165
  return None
154
166
 
155
167
  payload = base64.b64encode(serialized_data).decode("ascii")
156
-
168
+ frame_uuid = uuid.uuid4()
157
169
  answer = {
158
170
  "event": "media",
159
171
  "stream_sid": self._stream_sid,
160
172
  "media": {"payload": payload},
173
+ "uuid": frame_uuid,
161
174
  }
175
+ logger.debug(f"Sending media: {frame_uuid}")
162
176
 
163
177
  return json.dumps(answer)
164
178
 
@@ -189,6 +203,7 @@ class CustomFrameSerializer(FrameSerializer):
189
203
  if event == "media":
190
204
  media = message.get("media", {})
191
205
  payload_base64 = media.get("payload")
206
+ uuid = message.get("uuid")
192
207
 
193
208
  if not payload_base64:
194
209
  logger.warning("Media event missing payload")
@@ -199,6 +214,7 @@ class CustomFrameSerializer(FrameSerializer):
199
214
  except Exception as e:
200
215
  logger.error(f"Failed to decode base64 payload: {e}")
201
216
  return None
217
+ logger.debug(f"Received uuid: {uuid}")
202
218
 
203
219
  # Convert audio based on codec
204
220
  if self._codec == "pcmu":