added OutputDTMFUrgentFrame

This commit is contained in:
Aleix Conchillo Flaqué
2025-05-28 18:02:17 -07:00
parent a33d0b4b53
commit 513221d9fd
2 changed files with 27 additions and 9 deletions

View File

@@ -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).

View File

@@ -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
#