diff --git a/CHANGELOG.md b/CHANGELOG.md index e40d83de5..3d885a2dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to **pipecat** will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.0.31] - 2024-06-13 + +### Performance + +- Break long audio frames into 20ms chunks instead of 10ms. + ## [0.0.30] - 2024-06-13 ### Added @@ -18,6 +24,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Allow specifying frame processors' name through a new `name` constructor argument. +- Added `DeepgramSTTService`. This service has an ongoing websocket + connection. To handle this, it subclasses `AIService` instead of + `STTService`. The output of this service will be pushed from the same task, + except system frames like `StartFrame`, `CancelFrame` or + `StartInterruptionFrame`. + ### Changed - `FrameSerializer.deserialize()` can now return `None` in case it is not @@ -25,12 +37,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `daily_rest.DailyRoomProperties` now allows extra unknown parameters. -- Added `DeepgramSTTService`. This service has an ongoing websocket - connection. To handle this, it subclasses `AIService` instead of - `STTService`. The output of this service will be pushed from the same task, - except system frames like `StartFrame`, `CancelFrame` or - `StartInterruptionFrame`. - ### Fixed - Fixed an issue where `DailyRoomProperties.exp` always had the same old diff --git a/src/pipecat/transports/base_output.py b/src/pipecat/transports/base_output.py index d46201294..2a1461563 100644 --- a/src/pipecat/transports/base_output.py +++ b/src/pipecat/transports/base_output.py @@ -59,11 +59,11 @@ class BaseOutputTransport(FrameProcessor): self._stopped_event = asyncio.Event() self._is_interrupted = threading.Event() - # We will send 10ms audio which is the smallest possible amount of audio - # we can send. If we receive long audio frames we will chunk them into - # 10ms. This will help with interruption handling. - self._audio_chunk_size = int(self._params.audio_out_sample_rate / 100) * \ + # We will write 20ms audio at a time. If we receive long audio frames we + # will chunk them. This will help with interruption handling. + audio_bytes_10ms = int(self._params.audio_out_sample_rate / 100) * \ self._params.audio_out_channels * 2 + self._audio_chunk_size = audio_bytes_10ms * 2 # Create push frame task. This is the task that will push frames in # order. We also guarantee that all frames are pushed in the same task.