fix: double finals bug

This commit is contained in:
Martin Schweiger
2025-05-30 10:00:31 +08:00
parent 7f2e848a5c
commit db838634e7

View File

@@ -240,7 +240,9 @@ class AssemblyAISTTService(STTService):
if not message.transcript:
return
await self.stop_ttfb_metrics()
if message.end_of_turn:
if message.end_of_turn and (
not self._connection_params.formatted_finals or message.turn_is_formatted
):
await self.push_frame(
TranscriptionFrame(
message.transcript,