From 11e707fa09ae25e5dd0efc4a9049d9a5f2164bd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mence=20Lesn=C3=A9?= Date: Wed, 11 Dec 2024 16:04:36 +0100 Subject: [PATCH] fix: Partial recognition handling --- app/helpers/call_llm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/call_llm.py b/app/helpers/call_llm.py index 5199b787..44b54890 100644 --- a/app/helpers/call_llm.py +++ b/app/helpers/call_llm.py @@ -98,8 +98,8 @@ def _partial_stt_callback(text: str) -> None: # Init buffer if empty if not stt_buffer: stt_buffer.append("") - # Append the recognition - stt_buffer[-1] += text + # Replace the partial recognition + stt_buffer[-1] = text logger.debug("Partial recognition: %s", stt_buffer) def _complete_stt_callback(text: str) -> None: