fix: tts duplicate error issue - #2285
Conversation
|
Review of fix/tts_duplicate_error_issue The core insight is correct and worth fixing: a vendor Findings ordered by severity, verified against
The if self.sent_tts:
self.stop_event = asyncio.Event()
await self.stop_event.wait() # no timeoutThe new design assumes if not self.response_msgs or not self.send_end_text:
return
A second variant has no rescue at all: a vendor sends a fatal Options, roughly in order of preference:
More a design question, but it deserves an explicit answer in the description, because the new test pins it: assert tester.error_request_ids == ["request-3"]
assert tester.request3_end_reasons == [TTSAudioEndReason.REQUEST_END]For a genuinely advisory error that is right. For an error that truncated the audio, REQUEST_END tells consumers the turn finished cleanly, and the only signal otherwise is a separate Related, the fallback in reason = data if isinstance(data, TTSAudioEndReason) else TTSAudioEndReason.REQUEST_ENDSince
Removing the call at The replacement is a comment with no assertion.
In
Good that the two changed behaviors are pinned directly (the
Minor
Overall the direction is right and the |
No description provided.