Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions polyglotdb/acoustics/formants/refined.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,15 +349,16 @@ 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):
if bn != last_iteration_best_numbers[b_i]:
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(
Expand Down
Loading