Fixed an audio mixer issue when used alongside SmallWebRTCTransport.
This commit is contained in:
@@ -5,6 +5,15 @@ 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/),
|
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).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Refactored how the `start` method is handled in `SmallWebRTCOutputTransport` by
|
||||||
|
initializing it before the parent class. This fixes an audio mixer issue when used
|
||||||
|
alongside `SmallWebRTCTransport`, preventing unnecessary CPU usage and avoiding the
|
||||||
|
output being flooded with silent frames when no new audio is available.
|
||||||
|
|
||||||
## [0.0.66] - 2025-05-02
|
## [0.0.66] - 2025-05-02
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -484,9 +484,10 @@ class SmallWebRTCOutputTransport(BaseOutputTransport):
|
|||||||
self._params = params
|
self._params = params
|
||||||
|
|
||||||
async def start(self, frame: StartFrame):
|
async def start(self, frame: StartFrame):
|
||||||
await super().start(frame)
|
|
||||||
await self._client.setup(self._params, frame)
|
await self._client.setup(self._params, frame)
|
||||||
await self._client.connect()
|
await self._client.connect()
|
||||||
|
# Parent start.
|
||||||
|
await super().start(frame)
|
||||||
|
|
||||||
async def stop(self, frame: EndFrame):
|
async def stop(self, frame: EndFrame):
|
||||||
await super().stop(frame)
|
await super().stop(frame)
|
||||||
|
|||||||
Reference in New Issue
Block a user