Added
-
Added a new
start_metadatafield toPipelineParams. The provided metadata will be set to the initialStartFramebeing pushed from thePipelineTask. -
Added new fields to
PipelineParamsto control audio input and output sample rates for the whole pipeline. This allows controlling sample rates from a single place instead of having to specify sample rates in each service. Setting a sample rate to a service is still possible and will override the value fromPipelineParams. -
Introduce audio resamplers (
BaseAudioResampler). This is just a base class to implement audio resamplers. Currently, two implementations are providedSOXRAudioResamplerandResampyResampler. A newcreate_default_resampler()has been added (replacing the now deprecatedresample_audio()). -
It is now possible to specify the asyncio event loop that a
PipelineTaskand all the processors should run on by passing it as a new argument to thePipelineRunner. This could allow running pipelines in multiple threads each one with its own event loop. -
Added a new
utils.TaskManager. Instead of a global task manager we now have a task manager perPipelineTask. In the previous version the task manager was global, so running multiple simultaneousPipelineTasks could result in dangling task warnings which were not actually true. In order, for all the processors to know about the task manager, we pass it through theStartFrame. This means that processors should create tasks when they receive aStartFramebut not before (because they don't have a task manager yet). -
Added
TelnyxFrameSerializerto support Telnyx calls. A full running example has also been added toexamples/telnyx-chatbot. -
Allow pushing silence audio frames before
TTSStoppedFrame. This might be useful for testing purposes, for example, passing bot audio to an STT service which usually needs additional audio data to detect the utterance stopped. -
TwilioSerializernow supports transport message frames. With this we can create Twilio emulators. -
Added a new transport:
WebsocketClientTransport. -
Added a
metadatafield toFramewhich makes it possible to pass custom data to all frames. -
Added
test/utils.pyinside of pipecat package.
Changed
-
GatedOpenAILLMContextAggregatornow require keyword arguments. Also, a newstart_openargument has been added to set the initial state of the gate. -
Added
organizationandprojectlevel authentication toOpenAILLMService. -
Improved the language checking logic in
ElevenLabsTTSServiceandElevenLabsHttpTTSServiceto properly handle language codes based on model compatibility, with appropriate warnings when language codes cannot be applied. -
Updated
GoogleLLMContextto support pushingLLMMessagesUpdateFrames that contain a combination of function calls, function call responses, system messages, or just messages. -
InputDTMFFrameis now based onDTMFFrame. There's also a newOutputDTMFFrameframe.
Deprecated
resample_audio()is now deprecated, usecreate_default_resampler()instead.
Removed
AudioBufferProcessor.reset_audio_buffers()has been removed, useAudioBufferProcessor.start_recording()andAudioBufferProcessor.stop_recording()instead.
Fixed
-
Fixed a
AudioBufferProcessorthat would cause crackling in some recordings. -
Fixed an issue in
AudioBufferProcessorwhere user callback would not be called on task cancellation. -
Fixed an issue in
AudioBufferProcessorthat would cause wrong silence padding in some cases. -
Fixed an issue where
ElevenLabsTTSServicemessages would return a 1009 websocket error by increasing the max message size limit to 16MB. -
Fixed a
DailyTransportissue that would cause events to be triggered before join finished. -
Fixed a
PipelineTaskissue that was preventing processors to be cleaned up after cancelling the task. -
Fixed an issue where queuing a
CancelFrameto a pipeline task would not cause the task to finish. However, usingPipelineTask.cancel()is still the recommended way to cancel a task.
Other
-
Improved Unit Test
run_test()to usePipelineTaskandPipelineRunner. There's now also some control aroundStartFrameandEndFrame. TheEndTaskFramehas been removed since it doesn't seem necessary with this new approach. -
Updated
twilio-chatbotwith a few new features: use 8000 sample rate and avoid resampling, a new client useful for stress testing and testing locally without the need to make phone calls. Also, added audio recording on both the client and the server to make sure the audio sounds good. -
Updated examples to use
task.cancel()to immediately exit the example when a participant leaves or disconnects, instead of pushing anEndFrame. Pushing anEndFramecauses the bot to run through everything that is internally queued (which could take some seconds). Note that usingtask.cancel()might not always be the best option and pushing anEndFramecould still be desirable to make sure all the pipeline is flushed.