in src/agents/voice/result.py [0:0]
def _cleanup_tasks(self):
self._finish_turn()
for task in self._tasks:
if not task.done():
task.cancel()
if self._dispatcher_task and not self._dispatcher_task.done():
self._dispatcher_task.cancel()
if self.text_generation_task and not self.text_generation_task.done():
self.text_generation_task.cancel()