make no beam consistent with backtrack.

This commit is contained in:
liupeng
2025-01-09 23:13:11 +08:00
parent 65b2332e13
commit 4ebfb078c5

View File

@ -543,7 +543,7 @@ def backtrack_beam(trellis, emission, tokens, blank_id=0, beam_width=5):
break break
if not beams: if not beams:
raise ValueError("No valid path found") return None
best_beam = beams[0] best_beam = beams[0]
t = best_beam.time_index t = best_beam.time_index