From 81a5b29804800a4edd76c8dda2727d6fdf4b5643 Mon Sep 17 00:00:00 2001
From: 嘉渊 <wangjiaming.wjm@alibaba-inc.com>
Date: 星期四, 11 五月 2023 17:35:49 +0800
Subject: [PATCH] update repo
---
funasr/utils/prepare_data.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/funasr/utils/prepare_data.py b/funasr/utils/prepare_data.py
index e095a4c..24382c7 100644
--- a/funasr/utils/prepare_data.py
+++ b/funasr/utils/prepare_data.py
@@ -27,7 +27,7 @@
parts = line.strip().split()
if len(parts) < 2:
continue
- text_dict[parts[0]] = " ".join(parts[1:]).lower()
+ text_dict[parts[0]] = " ".join(parts[1:])
filter_count = 0
with open(wav_file, "w") as f_wav, open(text_file, "w") as f_text:
for sample_name, wav_path in wav_dict.items():
@@ -70,7 +70,7 @@
f.flush()
-def calc_shape(args, dataset, nj=32):
+def calc_shape(args, dataset, nj=64):
shape_path = os.path.join(args.data_dir, dataset, "speech_shape")
if os.path.exists(shape_path):
logging.info('Shape file for small dataset already exists.')
@@ -90,7 +90,7 @@
start = 0
for i in range(nj):
end = start + num_job_lines
- file = os.path.join(shape_path, "wav.scp.{}".format(str(i + 1)))
+ file = os.path.join(split_shape_path, "wav.scp.{}".format(str(i + 1)))
with open(file, "w") as f:
if i == nj - 1:
f.writelines(lines[start:])
@@ -115,7 +115,7 @@
logging.info('Generating shape files done.')
-def generate_data_list(data_dir, dataset, nj=32):
+def generate_data_list(data_dir, dataset, nj=64):
list_file = os.path.join(data_dir, dataset, "data.list")
if os.path.exists(list_file):
logging.info('Data list for large dataset already exists.')
--
Gitblit v1.9.1