diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e9b344d7..f557463a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,9 +14,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed initial metrics format. It was using the wrong keys name/time instead of + processor/value. + - STT services should be using ISO 8601 time format for transcription frames. -- Fix an issue that would cause Daily transport to show a stop transcription +- Fixed an issue that would cause Daily transport to show a stop transcription error when actually none occurred. ## [0.0.37] - 2024-07-22 diff --git a/src/pipecat/pipeline/task.py b/src/pipecat/pipeline/task.py index ae5056a48..9f45f33ea 100644 --- a/src/pipecat/pipeline/task.py +++ b/src/pipecat/pipeline/task.py @@ -96,8 +96,8 @@ async def queue_frames(self, frames: Iterable[Frame] | AsyncIterable[Frame]): def _initial_metrics_frame(self) -> MetricsFrame: processors = self._pipeline.processors_with_metrics() - ttfb = [{"name": p.name, "time": 0.0} for p in processors] - processing = [{"name": p.name, "time": 0.0} for p in processors] + ttfb = [{"processor": p.name, "value": 0.0} for p in processors] + processing = [{"processor": p.name, "value": 0.0} for p in processors] return MetricsFrame(ttfb=ttfb, processing=processing) async def _process_down_queue(self): diff --git a/src/pipecat/processors/frameworks/rtvi.py b/src/pipecat/processors/frameworks/rtvi.py index f7bd170c2..986b59bcd 100644 --- a/src/pipecat/processors/frameworks/rtvi.py +++ b/src/pipecat/processors/frameworks/rtvi.py @@ -460,8 +460,8 @@ async def _handle_setup(self, setup: RTVISetup | None): # Send new initial metrics with the new processors processors = parent.processors_with_metrics() processors.extend(self._pipeline.processors_with_metrics()) - ttfb = [{"name": p.name, "time": 0.0} for p in processors] - processing = [{"name": p.name, "time": 0.0} for p in processors] + ttfb = [{"processor": p.name, "value": 0.0} for p in processors] + processing = [{"processor": p.name, "value": 0.0} for p in processors] await self.push_frame(MetricsFrame(ttfb=ttfb, processing=processing)) message = RTVIBotReady()