Aggregate turn text into a complete LLMTextFrame to prevent TTS sentence truncation
This commit is contained in:
+4
-1
@@ -322,11 +322,14 @@ class OpenCodeLLM(FrameProcessor):
|
||||
cleaned = _clean_spoken_text(text_line)
|
||||
if cleaned:
|
||||
chunks.append(cleaned)
|
||||
await self.push_frame(LLMTextFrame(cleaned))
|
||||
|
||||
await proc.wait()
|
||||
await stderr_task
|
||||
|
||||
full_text = _clean_spoken_text(" ".join(chunks))
|
||||
if full_text:
|
||||
await self.push_frame(LLMTextFrame(full_text))
|
||||
|
||||
except asyncio.CancelledError:
|
||||
logger.info("OpenCode turn cancelled mid-response.")
|
||||
if proc and proc.returncode is None:
|
||||
|
||||
Reference in New Issue
Block a user