From cd6842c893fafb0884ca26399846792254303ba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E9=9C=87=E4=B8=9C?= <275331498@qq.com> Date: Mon, 11 Mar 2024 10:06:48 +0800 Subject: [PATCH] [ctc] Update search.py According to: https://github.com/wenet-e2e/wenet/blob/a93af33afb29585d7398265f1076d6dec1f11ab8/runtime/core/decoder/ctc_prefix_beam_search.cc#L142 --- wenet/transformer/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wenet/transformer/search.py b/wenet/transformer/search.py index 9fda02da9..6f77e728d 100644 --- a/wenet/transformer/search.py +++ b/wenet/transformer/search.py @@ -175,7 +175,7 @@ def ctc_prefix_beam_search( next_score1.ns = log_add(next_score1.ns, prefix_score.ns + prob) if next_score1.v_ns < prefix_score.v_ns + prob: - next_score1.vs_ns = prefix_score.v_ns + prob + next_score1.v_ns = prefix_score.v_ns + prob if next_score1.cur_token_prob < prob: next_score1.cur_token_prob = prob next_score1.times_ns = prefix_score.times_ns.copy(