diff --git a/egs/zipvoice/local/compute_fbank.py b/egs/zipvoice/local/compute_fbank.py index 09a154229..0c440b995 100644 --- a/egs/zipvoice/local/compute_fbank.py +++ b/egs/zipvoice/local/compute_fbank.py @@ -19,11 +19,13 @@ import argparse import logging import os +from concurrent.futures import ProcessPoolExecutor as Pool from pathlib import Path from typing import Optional -from concurrent.futures import ProcessPoolExecutor as Pool +import lhotse import torch +from feature import TorchAudioFbank, TorchAudioFbankConfig from lhotse import ( CutSet, LilcomChunkyWriter, @@ -31,9 +33,6 @@ from lhotse import ( set_audio_duration_mismatch_tolerance, ) -from feature import TorchAudioFbank, TorchAudioFbankConfig -import lhotse - # Torch's multithreaded behavior needs to be disabled or # it wastes a lot of CPU and slow things down. # Do this outside of main() in case it needs to take effect diff --git a/egs/zipvoice/local/preprocess_emilia.py b/egs/zipvoice/local/preprocess_emilia.py index bd76446aa..96a7ff228 100644 --- a/egs/zipvoice/local/preprocess_emilia.py +++ b/egs/zipvoice/local/preprocess_emilia.py @@ -24,15 +24,14 @@ This file reads the texts in given manifest and save the cleaned new cuts. """ import argparse -import logging import glob +import logging import os +from concurrent.futures import ProcessPoolExecutor as Pool from pathlib import Path from typing import List from lhotse import CutSet, load_manifest_lazy -from concurrent.futures import ProcessPoolExecutor as Pool - from tokenizer import ( is_alphabet, is_chinese,