diff --git a/CHANGELOG.md b/CHANGELOG.md index aae14f431..1022711be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Added `OutputDTMFUrgentFrame` to send a DTMF keypress quickly. The previous + `OutputDTMFFrame` queues the keypress with the rest of data frames. + - Added new functions `DailyTransport.start_transcription()` and `DailyTransport.stop_transcription()` to be able to start and stop Daily transcription dynamically (maybe with different settings). diff --git a/src/pipecat/frames/frames.py b/src/pipecat/frames/frames.py index 18bc2874b..758ba7556 100644 --- a/src/pipecat/frames/frames.py +++ b/src/pipecat/frames/frames.py @@ -413,22 +413,19 @@ class TransportMessageFrame(DataFrame): @dataclass -class DTMFFrame(DataFrame): +class DTMFFrame: """A DTMF button frame""" button: KeypadEntry @dataclass -class InputDTMFFrame(DTMFFrame): - """A DTMF button input""" +class OutputDTMFFrame(DTMFFrame, DataFrame): + """A DTMF keypress output that will be queued. If your transport supports + multiple dial-out destinations, use the `transport_destination` field to + specify where the DTMF keypress should be sent. - pass - - -@dataclass -class OutputDTMFFrame(DTMFFrame): - """A DTMF button output""" + """ pass @@ -777,6 +774,24 @@ class VisionImageRawFrame(InputImageRawFrame): return f"{self.name}(pts: {pts}, text: [{self.text}], size: {self.size}, format: {self.format})" +@dataclass +class InputDTMFFrame(DTMFFrame, SystemFrame): + """A DTMF keypress input.""" + + pass + + +@dataclass +class OutputDTMFUrgentFrame(DTMFFrame, SystemFrame): + """A DTMF keypress output that will be sent right away. If your transport + supports multiple dial-out destinations, use the `transport_destination` + field to specify where the DTMF keypress should be sent. + + """ + + pass + + # # Control frames #