From 92a9fc3ce3c8458cf5a0ff3e88de874c199c18dc Mon Sep 17 00:00:00 2001 From: Dmitrii Mukhutdinov Date: Thu, 14 Sep 2023 13:27:15 +0000 Subject: [PATCH 1/2] Fix broken `save_audios` --- lhotse/cut/base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lhotse/cut/base.py b/lhotse/cut/base.py index a5d37a7be..5965f97d4 100644 --- a/lhotse/cut/base.py +++ b/lhotse/cut/base.py @@ -850,7 +850,11 @@ def save_audio( ) ], ) - return fastcopy(self, recording=recording) + return fastcopy( + recording.to_cut(), + supervisions=self.supervisions, + custom=self.custom if hasattr(self, "custom") else None, + ) def speakers_feature_mask( self, From 1f52e51eae08ee1f66a39644f1eb402742805408 Mon Sep 17 00:00:00 2001 From: Dmitrii Mukhutdinov Date: Thu, 14 Sep 2023 13:54:22 +0000 Subject: [PATCH 2/2] Fix `copy_data` behavior --- lhotse/cut/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lhotse/cut/base.py b/lhotse/cut/base.py index 5965f97d4..dbfc6747e 100644 --- a/lhotse/cut/base.py +++ b/lhotse/cut/base.py @@ -852,8 +852,10 @@ def save_audio( ) return fastcopy( recording.to_cut(), + id=self.id, supervisions=self.supervisions, custom=self.custom if hasattr(self, "custom") else None, + features=self.features if self.has_features else None, ) def speakers_feature_mask(