Skip to content

Commit d9ee454

Browse files
authored
Merge pull request #3301 from zh794390558/rhy
[t2s] refactor Prosody prediction
2 parents 9f42a31 + 6e7c71b commit d9ee454

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

examples/other/rhy/local/pre_for_sp_aishell.py

100644100755
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env python3
12
import argparse
23
import os
34
import re
@@ -8,7 +9,7 @@
89

910

1011
def replace_rhy_with_punc(line):
11-
# r'[:、,;。?!,.:;"?!”’《》【】<=>{}()()#&@“”^_|…\\]%*$', '', line) #参考checkcheck_oov.py,
12+
# r'[:、,;。?!,.:;"?!”’《》【】<=>{}()()#&@“”^_|…\\]%*$', '', line) #参考check_oov.py,
1213
line = re.sub(r'[:、,;。?!,.:;"?!’《》【】<=>{}()()#&@“”^_|…\\]%*$', '', line)
1314
for r in replace_.keys():
1415
if r in line:

examples/other/rhy/local/pre_for_sp_csmsc.py

100644100755
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env python3
12
import argparse
23
import os
34
import re
@@ -6,7 +7,7 @@
67

78

89
def replace_rhy_with_punc(line):
9-
# r'[:、,;。?!,.:;"?!”’《》【】<=>{}()()#&@“”^_|…\\]%*$', '', line) #参考checkcheck_oov.py,
10+
# r'[:、,;。?!,.:;"?!”’《》【】<=>{}()()#&@“”^_|…\\]%*$', '', line) #参考check_oov.py,
1011
line = re.sub(r'^$\*%', '', line)
1112
for r in replace_.keys():
1213
if r in line:

examples/other/rhy/run.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ gpus=0
66
stage=0
77
stop_stage=100
88

9+
data=data
10+
mkdir -p $data
11+
912
aishell_data=label_train-set.txt
1013
csmsc_data=000001-010000.txt
11-
processed_path=data
1214

1315
conf_path=conf/default.yaml
1416
train_output_path=exp/default
@@ -23,7 +25,7 @@ source ${MAIN_ROOT}/utils/parse_options.sh || exit 1
2325

2426
if [ ${stage} -le 0 ] && [ ${stop_stage} -ge 0 ]; then
2527
# prepare data
26-
./local/data.sh ${aishell_data} ${csmsc_data} ${processed_path}
28+
./local/data.sh ${aishell_data} ${csmsc_data} ${data}
2729
fi
2830

2931
if [ ${stage} -le 1 ] && [ ${stop_stage} -ge 1 ]; then

paddlespeech/text/exps/ernie_linear/train.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def train_sp(args, config):
6666
seed_everything(config.seed)
6767

6868
print(
69-
f"rank: {dist.get_rank()}, pid: {os.getpid()}, parent_pid: {os.getppid()}",
69+
f"rank:{dist.get_rank()}, pid: {os.getpid()}, parent_pid: {os.getppid()}"
7070
)
7171
# dataloader has been too verbose
7272
logging.getLogger("DataLoader").disabled = True

0 commit comments

Comments
 (0)