未验证 提交 d9ee4549 编写于 作者: H Hui Zhang 提交者: GitHub

Merge pull request #3301 from zh794390558/rhy

[t2s] refactor Prosody prediction 
#!/usr/bin/env python3
import argparse
import os
import re
......@@ -8,7 +9,7 @@ replace_ = {"#1": "%", "#2": "`", "#3": "~", "#4": "$"}
def replace_rhy_with_punc(line):
# r'[:、,;。?!,.:;"?!”’《》【】<=>{}()()#&@“”^_|…\\]%*$', '', line) #参考checkcheck_oov.py,
# r'[:、,;。?!,.:;"?!”’《》【】<=>{}()()#&@“”^_|…\\]%*$', '', line) #参考check_oov.py,
line = re.sub(r'[:、,;。?!,.:;"?!’《》【】<=>{}()()#&@“”^_|…\\]%*$', '', line)
for r in replace_.keys():
if r in line:
......
#!/usr/bin/env python3
import argparse
import os
import re
......@@ -6,7 +7,7 @@ replace_ = {"#1": "%", "#2": "`", "#3": "~", "#4": "$"}
def replace_rhy_with_punc(line):
# r'[:、,;。?!,.:;"?!”’《》【】<=>{}()()#&@“”^_|…\\]%*$', '', line) #参考checkcheck_oov.py,
# r'[:、,;。?!,.:;"?!”’《》【】<=>{}()()#&@“”^_|…\\]%*$', '', line) #参考check_oov.py,
line = re.sub(r'^$\*%', '', line)
for r in replace_.keys():
if r in line:
......
......@@ -6,9 +6,11 @@ gpus=0
stage=0
stop_stage=100
data=data
mkdir -p $data
aishell_data=label_train-set.txt
csmsc_data=000001-010000.txt
processed_path=data
conf_path=conf/default.yaml
train_output_path=exp/default
......@@ -23,7 +25,7 @@ source ${MAIN_ROOT}/utils/parse_options.sh || exit 1
if [ ${stage} -le 0 ] && [ ${stop_stage} -ge 0 ]; then
# prepare data
./local/data.sh ${aishell_data} ${csmsc_data} ${processed_path}
./local/data.sh ${aishell_data} ${csmsc_data} ${data}
fi
if [ ${stage} -le 1 ] && [ ${stop_stage} -ge 1 ]; then
......
......@@ -66,7 +66,7 @@ def train_sp(args, config):
seed_everything(config.seed)
print(
f"rank: {dist.get_rank()}, pid: {os.getpid()}, parent_pid: {os.getppid()}",
f"rank:{dist.get_rank()}, pid: {os.getpid()}, parent_pid: {os.getppid()}"
)
# dataloader has been too verbose
logging.getLogger("DataLoader").disabled = True
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册