lzr265946
2022-12-29 fede6462002a979fb13832fd1e96c4b48312726d
fix modelscope inference result is empty
1个文件已修改
5 ■■■■ 已修改文件
funasr/bin/modelscope_infer.py 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
funasr/bin/modelscope_infer.py
@@ -82,6 +82,9 @@
            wav_id, wav_path = line.strip().split()
            logging.info("decoding, utt_id: ['{}']".format(wav_id))
            rec_result = inference_pipeline(audio_in=wav_path)
            text = rec_result["text"]
            if 'text' in rec_result:
                text = rec_result["text"]
            else:
                text = ''
            f_out.write(wav_id + " " + text + "\n")
            logging.info("best hypo: {} \n".format(text))