Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/eva/assistant/pipeline/observers.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,26 @@ def write(self, event_type: str, data: dict, timestamp_ms: int | None = None) ->
except Exception as e:
logger.error(f"Error writing framework log: {e}")

def turn_start(self, timestamp_ms: int | None = None) -> None:
"""Log a turn start event."""
self.write("turn_start", {"frame": "turn_start"}, timestamp_ms)

def turn_end(self, was_interrupted: bool = False, timestamp_ms: int | None = None) -> None:
"""Log a turn end event."""
self.write("turn_end", {"frame": "turn_end", "was_interrupted": was_interrupted}, timestamp_ms)

def tts_text(self, text: str, timestamp_ms: int | None = None) -> None:
"""Log TTS text (what was actually spoken)."""
self.write("tts_text", {"frame": text}, timestamp_ms)

def llm_response(self, text: str, timestamp_ms: int | None = None) -> None:
"""Log LLM response text (full intended response)."""
self.write("llm_response", {"frame": text}, timestamp_ms)

def s2s_transcript(self, text: str, timestamp_ms: int | None = None) -> None:
"""Log S2S transcript (what was actually spoken)."""
self.write("s2s_transcript", {"frame": text}, timestamp_ms)


class MetricsLogWriter:
"""Writes pipecat_metrics.jsonl for non-Pipecat frameworks.
Expand Down
Loading