Skip to content

Commit

Permalink
Avoid overwrite existing custom fields in dnsmos annotation. (#1450)
Browse files Browse the repository at this point in the history
Avoid overwritten existing custom fields in dnsmos annotation.

Co-authored-by: Piotr Żelasko <[email protected]>
  • Loading branch information
pkufool and pzelasko authored Feb 11, 2025
1 parent cb4d71a commit afd7cce
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lhotse/workflows/dnsmos.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,5 +209,8 @@ def _annotate_cuts(

for future in tqdm(futures, desc="Processing"):
cut, result = future.result()
new_cut = fastcopy(cut, custom=result)
yield new_cut
if cut.custom is not None:
cut.custom.update(result)
else:
cut.custom = result
yield cut

0 comments on commit afd7cce

Please sign in to comment.