From 36bc2a61053c0cf983ea36bd16216b507eaa1275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=98=89=E6=B8=8A?= Date: Thu, 25 May 2023 19:03:25 +0800 Subject: [PATCH] update repo --- egs/wenetspeech/conformer/local/process_opus.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/egs/wenetspeech/conformer/local/process_opus.py b/egs/wenetspeech/conformer/local/process_opus.py index 044d183b9..d22223d41 100755 --- a/egs/wenetspeech/conformer/local/process_opus.py +++ b/egs/wenetspeech/conformer/local/process_opus.py @@ -19,7 +19,7 @@ import os import sys -from pydub import AudioSegment +import torchaudio.backend.sox_io_backend as sox def read_file(wav_scp, segments): @@ -60,7 +60,7 @@ def output(output_wav_scp, utt_list, seg_path_list, start_time_list, end_time_li os.makedirs(output_dir, exist_ok=True) if current_wav_path != previous_wav_path: - source_wav = AudioSegment.from_file(current_wav_path) + source_wav, sampling_rate = sox.load(current_wav_path, normalize=False) previous_wav_path = current_wav_path start = int(start_time_list[i] * 1000)