mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
fix uniasr postprocess
This commit is contained in:
parent
78a3b75cc0
commit
da830cb825
@ -261,6 +261,7 @@ class Speech2Text:
|
||||
|
||||
# Change integer-ids to tokens
|
||||
token = self.converter.ids2tokens(token_int)
|
||||
token = list(filter(lambda x: x != "<gbg>", token))
|
||||
|
||||
if self.tokenizer is not None:
|
||||
text = self.tokenizer.tokens2text(token)
|
||||
@ -512,7 +513,7 @@ def inference_modelscope(
|
||||
finish_count += 1
|
||||
asr_utils.print_progress(finish_count / file_count)
|
||||
if writer is not None:
|
||||
ibest_writer["text"][key] = text
|
||||
ibest_writer["text"][key] = text_postprocessed
|
||||
return asr_result_list
|
||||
|
||||
return _forward
|
||||
|
||||
@ -261,6 +261,7 @@ class Speech2Text:
|
||||
|
||||
# Change integer-ids to tokens
|
||||
token = self.converter.ids2tokens(token_int)
|
||||
token = list(filter(lambda x: x != "<gbg>", token))
|
||||
|
||||
if self.tokenizer is not None:
|
||||
text = self.tokenizer.tokens2text(token)
|
||||
@ -512,7 +513,7 @@ def inference_modelscope(
|
||||
finish_count += 1
|
||||
asr_utils.print_progress(finish_count / file_count)
|
||||
if writer is not None:
|
||||
ibest_writer["text"][key] = text
|
||||
ibest_writer["text"][key] = text_postprocessed
|
||||
return asr_result_list
|
||||
|
||||
return _forward
|
||||
|
||||
Loading…
Reference in New Issue
Block a user