This commit is contained in:
游雁 2024-04-30 01:23:51 +08:00
parent 0454015357
commit db89040b78
3 changed files with 4 additions and 1 deletions

View File

@ -0,0 +1,2 @@
/Users/zhifu/funasr1.0/data/list/train.jsonl
/Users/zhifu/funasr1.0/data/list/val.jsonl

0
data_tmp/train.jsonl Normal file
View File

View File

@ -35,7 +35,7 @@ def gen_scp_from_jsonl(jsonl_file, jsonl_file_out, ncpu):
for line in lines:
jsonl_file_out_f.write(line)
jsonl_file_out_f.write(line + "\n")
jsonl_file_out_f.flush()
jsonl_file_out_f.close()
@ -53,6 +53,7 @@ def update_data(lines, i):
if (source_len_old - source_len) > 100 or (source_len - source_len_old) > 100:
print(f"old: {source_len_old}, new: {source_len}, wav: {wav_path}")
data["source_len"] = source_len
data["source"] = wav_path
jsonl_line = json.dumps(data, ensure_ascii=False)
lines[i] = jsonl_line