lzr265946
2023-03-24 da830cb825edfe55a5a40eddfdd2a5fb8d8e8247
fix uniasr postprocess
2个文件已修改
6 ■■■■■ 已修改文件
funasr/bin/asr_inference_uniasr.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
funasr/bin/asr_inference_uniasr_vad.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
funasr/bin/asr_inference_uniasr.py
@@ -261,6 +261,7 @@
            # 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 @@
                    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
funasr/bin/asr_inference_uniasr_vad.py
@@ -261,6 +261,7 @@
            # 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 @@
                    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