Merge pull request #3301 from zh794390558/rhy

[t2s] refactor Prosody prediction
pull/3303/head
Hui Zhang 2 years ago committed by GitHub
commit d9ee4549d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,3 +1,4 @@
#!/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:

@ -1,3 +1,4 @@
#!/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

Loading…
Cancel
Save