嘉渊
2023-07-20 e215a76bb39f6ec35b81d1e6d131012a49d2a404
egs/wenetspeech/conformer/local/process_opus.py
@@ -65,8 +65,8 @@
            start = int(start_time_list[i] * sample_rate)
            end = int(end_time_list[i] * sample_rate)
            target_audio = waveform[:, start:end].transpose(0, 1).contiguous()
            target_audio.export(seg_wav_path, format="wav")
            target_audio = waveform[:, start:end]
            torchaudio.save(seg_wav_path, target_audio, sample_rate)
            fout.write("{} {}\n".format(utt_id, seg_wav_path))
            if i % step == 0: