speech_asr
2023-02-14 216dc0978c88d3d29c228b7e65445810d5b299bb
add wav/text mismatch process
1个文件已修改
2 ■■■ 已修改文件
funasr/utils/wav_utils.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
funasr/utils/wav_utils.py
@@ -311,7 +311,7 @@
        sample_name, txt = parts
        text_dict[sample_name] = txt
    filter_count = 0
    with open(wav_file) as f_wav, open(text_file) as f_text:
    with open(wav_file, "w") as f_wav, open(text_file, "w") as f_text:
        for sample_name, wav_path in wav_dict.items():
            if sample_name in text_dict.keys():
                f_wav.write(sample_name + " " + wav_path  + "\n")