From 25f392b3d8037b93728494640f7ebf3b683f8459 Mon Sep 17 00:00:00 2001 From: Massimo Lipari Date: Wed, 5 Aug 2026 17:08:49 -0400 Subject: [PATCH] Fix bug in refined.py --- polyglotdb/acoustics/formants/refined.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/polyglotdb/acoustics/formants/refined.py b/polyglotdb/acoustics/formants/refined.py index 36bcba20..3becc28a 100644 --- a/polyglotdb/acoustics/formants/refined.py +++ b/polyglotdb/acoustics/formants/refined.py @@ -349,8 +349,6 @@ def analyze_formant_points_refinement( prev_prototype_metadata = prototype_metadata best_prototype_metadata.update(prototype_metadata) - last_iteration_best_numbers = best_numbers - if iteration > 0: changed_numbers = 0 for b_i, bn in enumerate(best_numbers): @@ -358,6 +356,9 @@ def analyze_formant_points_refinement( changed_numbers += 1 if changed_numbers == 0: break + + last_iteration_best_numbers = best_numbers + log_output.append([speaker, vowel, str(len(output)), str(iteration + 1)]) for s, v, token_count, iteration_count in log_output: print(