Merge branch 'develop' into dp2

pull/735/head
huangyuxin 3 years ago
commit c7071dd2b4

@ -17,7 +17,7 @@ config_path=$1
ckpt_prefix=$2
chunk_mode=false
if [[ ${config_path} =~ ^chunk_ ]];then
if [[ ${config_path} =~ ^.*chunk_.*yaml$ ]];then
chunk_mode=true
fi

@ -102,7 +102,9 @@ def create_manifest(data_dir, manifest_path_prefix):
for line in json_lines:
fout.write(line + '\n')
with open(dtype + '.meta', 'w') as f:
manifest_dir = os.path.dirname(manifest_path_prefix)
meta_path = os.path.join(manifest_dir, dtype) + '.meta'
with open(meta_path, 'w') as f:
print(f"{dtype}:", file=f)
print(f"{total_num} utts", file=f)
print(f"{total_sec / (60*60)} h", file=f)

@ -103,7 +103,9 @@ def create_manifest(data_dir, manifest_path_prefix):
for line in json_lines:
fout.write(line + '\n')
with open(dtype + '.meta', 'w') as f:
manifest_dir = os.path.dirname(manifest_path_prefix)
meta_path = os.path.join(manifest_dir, dtype) + '.meta'
with open(meta_path, 'w') as f:
print(f"{dtype}:", file=f)
print(f"{total_num} utts", file=f)
print(f"{total_sec / (60*60)} h", file=f)

@ -114,8 +114,10 @@ def create_manifest(data_dir, manifest_path):
for line in json_lines:
out_file.write(line + '\n')
subset = manifest_path
with open(subset + '.meta', 'w') as f:
subset = os.path.splitext(manifest_path)[1][1:]
manifest_dir = os.path.dirname(manifest_path)
meta_path = os.path.join(manifest_dir, dtype) + '.meta'
with open(meta_path, 'w') as f:
print(f"{subset}:", file=f)
print(f"{total_num} utts", file=f)
print(f"{total_sec / (60*60)} h", file=f)

@ -93,8 +93,10 @@ def create_manifest(data_dir, manifest_path):
for line in json_lines:
out_file.write(line + '\n')
subset = os.path.splitext(manifest_path)[1]
with open(subset + '.meta', 'w') as f:
subset = os.path.splitext(manifest_path)[1][1:]
manifest_dir = os.path.dirname(manifest_path)
meta_path = os.path.join(manifest_dir, dtype) + '.meta'
with open(meta_path, 'w') as f:
print(f"{subset}:", file=f)
print(f"{total_num} utts", file=f)
print(f"{total_sec / (60*60)} h", file=f)

@ -139,7 +139,9 @@ def create_manifest(data_dir, manifest_path_prefix):
for line in json_lines:
fout.write(line + '\n')
with open(dtype + '.meta', 'w') as f:
manifest_dir = os.path.dirname(manifest_path_prefix)
meta_path = os.path.join(manifest_dir, dtype) + '.meta'
with open(meta_path, 'w') as f:
print(f"{dtype}:", file=f)
print(f"{total_num} utts", file=f)
print(f"{total_sec / (60*60)} h", file=f)

@ -198,7 +198,9 @@ def create_manifest(data_dir, manifest_path_prefix):
for line in json_lines:
fout.write(line + '\n')
with open(dtype.lower() + '.meta', 'w') as f:
manifest_dir = os.path.dirname(manifest_path_prefix)
meta_path = os.path.join(manifest_dir, dtype.lower()) + '.meta'
with open(meta_path, 'w') as f:
print(f"{dtype}:", file=f)
print(f"{total_num} utts", file=f)
print(f"{total_sec / (60*60)} h", file=f)

@ -17,9 +17,10 @@ config_path=$1
ckpt_prefix=$2
chunk_mode=false
if [[ ${config_path} =~ ^chunk_ ]];then
if [[ ${config_path} =~ ^.*chunk_.*yaml$ ]];then
chunk_mode=true
fi
echo "chunk mode ${chunk_mode}"
# download language model

@ -17,7 +17,7 @@ config_path=$1
ckpt_prefix=$2
chunk_mode=false
if [[ ${config_path} =~ ^chunk_ ]];then
if [[ ${config_path} =~ ^.*chunk_.*yaml$ ]];then
chunk_mode=true
fi

@ -16,7 +16,7 @@ config_path=$1
ckpt_prefix=$2
chunk_mode=false
if [[ ${config_path} =~ ^chunk_ ]];then
if [[ ${config_path} =~ ^.*chunk_.*yaml$ ]];then
chunk_mode=true
fi

Loading…
Cancel
Save