mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-06 14:40:00 +08:00
讲转写逻辑改为多进程利用多核cpu提高转写效率
讲转写逻辑改为多进程利用多核cpu提高转写效率
This commit is contained in:
parent
9886213592
commit
ff0b37e7d9
@ -30,7 +30,6 @@ inference_pipeline = pipeline(
|
||||
punc_model='tools/damo_asr/models/punc_ct-transformer_zh-cn-common-vocab272727-pytorch',
|
||||
)
|
||||
|
||||
|
||||
def process_audio_file(dir,name,opt_name):
|
||||
|
||||
try:
|
||||
@ -42,7 +41,6 @@ def process_audio_file(dir,name,opt_name):
|
||||
except:
|
||||
print(traceback.format_exc())
|
||||
|
||||
|
||||
def run__process(): # 主进程
|
||||
|
||||
opt_dir="output/asr_opt"
|
||||
@ -53,7 +51,6 @@ def run__process(): # 主进程
|
||||
with multiprocessing.Pool(processes=processes) as pool:
|
||||
pool.starmap(process_audio_file, [(dir, name ,opt_name) for name in os.listdir(dir)])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
run__process()
|
||||
|
Loading…
x
Reference in New Issue
Block a user