Binbin Gu
2023-04-27 d6e8c17ba6eef78ddae75edd8b3dd8f69b3f0bf4
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))