mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
update infer func for old contextual
This commit is contained in:
parent
9321718b3a
commit
5690a8bcb3
@ -2107,7 +2107,7 @@ class ContextualParaformer(Paraformer):
|
||||
|
||||
return loss_att, acc_att, cer_att, wer_att, loss_pre
|
||||
|
||||
def cal_decoder_with_predictor(self, encoder_out, encoder_out_lens, sematic_embeds, ys_pad_lens, hw_list=None):
|
||||
def cal_decoder_with_predictor(self, encoder_out, encoder_out_lens, sematic_embeds, ys_pad_lens, hw_list=None, clas_scale=1.0):
|
||||
if hw_list is None:
|
||||
# default hotword list
|
||||
hw_list = [torch.Tensor([self.sos]).long().to(encoder_out.device)] # empty hotword list
|
||||
|
||||
Loading…
Reference in New Issue
Block a user