From 5612bf513b504a8d1115ac6720f2f4aa68256470 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Tue, 13 Jan 2026 13:50:09 -0800 Subject: [PATCH] LLMContext: fix create_audio_message --- changelog/3435.fixed.md | 1 + src/pipecat/processors/aggregators/llm_context.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog/3435.fixed.md diff --git a/changelog/3435.fixed.md b/changelog/3435.fixed.md new file mode 100644 index 000000000..a4482c328 --- /dev/null +++ b/changelog/3435.fixed.md @@ -0,0 +1 @@ +- Fixed `LLMContext.create_audio_message()` by correcting an internal helper that was incorrectly declared async while being run in `asyncio.to_thread()`. diff --git a/src/pipecat/processors/aggregators/llm_context.py b/src/pipecat/processors/aggregators/llm_context.py index 205d55269..4b0e95aa7 100644 --- a/src/pipecat/processors/aggregators/llm_context.py +++ b/src/pipecat/processors/aggregators/llm_context.py @@ -206,7 +206,7 @@ class LLMContext: """ content = [{"type": "text", "text": text}] - async def encode_audio(): + def encode_audio(): sample_rate = audio_frames[0].sample_rate num_channels = audio_frames[0].num_channels