Skip to content

Commit

Permalink
frames: log text with [] so we can distinguish spaces better
Browse files Browse the repository at this point in the history
  • Loading branch information
aconchillo committed Sep 24, 2024
1 parent a483f1a commit 31b5667
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/pipecat/frames/frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,7 @@ class VisionImageRawFrame(InputImageRawFrame):

def __str__(self):
pts = format_pts(self.pts)
return (
f"{self.name}(pts: {pts}, text: {self.text}, size: {self.size}, format: {self.format})"
)
return f"{self.name}(pts: {pts}, text: [{self.text}], size: {self.size}, format: {self.format})"


@dataclass
Expand Down Expand Up @@ -177,7 +175,7 @@ class TextFrame(DataFrame):

def __str__(self):
pts = format_pts(self.pts)
return f"{self.name}(pts: {pts}, text: {self.text})"
return f"{self.name}(pts: {pts}, text: [{self.text}])"


@dataclass
Expand All @@ -192,7 +190,7 @@ class TranscriptionFrame(TextFrame):
language: Language | None = None

def __str__(self):
return f"{self.name}(user: {self.user_id}, text: {self.text}, language: {self.language}, timestamp: {self.timestamp})"
return f"{self.name}(user: {self.user_id}, text: [{self.text}], language: {self.language}, timestamp: {self.timestamp})"


@dataclass
Expand All @@ -205,7 +203,7 @@ class InterimTranscriptionFrame(TextFrame):
language: Language | None = None

def __str__(self):
return f"{self.name}(user: {self.user_id}, text: {self.text}, language: {self.language}, timestamp: {self.timestamp})"
return f"{self.name}(user: {self.user_id}, text: [{self.text}], language: {self.language}, timestamp: {self.timestamp})"


@dataclass
Expand Down

0 comments on commit 31b5667

Please sign in to comment.