Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor prep_segments in SVS #5210

Merged
merged 26 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c5596ec
combine prep_segments and xml into one file
jerryuhoo Jun 3, 2023
e3834e4
Merge branch 'espnet:master' into namine
jerryuhoo Jun 3, 2023
aa25430
support natsume
jerryuhoo Jun 4, 2023
f03b111
refactor prep_segments code
jerryuhoo Jun 4, 2023
e842ad9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 4, 2023
e85b9bc
update natsume
jerryuhoo Jun 4, 2023
4f72417
Add namine dataset
jerryuhoo Jun 5, 2023
c75c4a6
Add error hint for fixing the dataset
jerryuhoo Jun 5, 2023
2c95176
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 5, 2023
f9d4982
delete glu config
jerryuhoo Jun 5, 2023
c06012f
update namine run.sh
jerryuhoo Jun 5, 2023
cf1ab4c
remove unused code
jerryuhoo Jun 5, 2023
9875e8f
fix svs data prep
jerryuhoo Jun 11, 2023
ea964ec
fix namine ci error
jerryuhoo Jun 11, 2023
6cd573b
Add instruction for fixing the dataset
jerryuhoo Jun 11, 2023
a295ce1
fix comment
jerryuhoo Jun 11, 2023
a57f3cf
fix cmd.sh
jerryuhoo Jun 11, 2023
c703483
Add data path
jerryuhoo Jun 11, 2023
d273893
Update egs2/TEMPLATE/svs1/README.md
jerryuhoo Jun 15, 2023
a625bee
fix length regulator bug
jerryuhoo Jun 15, 2023
5794803
remove unused code
jerryuhoo Jun 15, 2023
49b9e48
Update svs configs
jerryuhoo Jun 15, 2023
6703a4a
update prep_segments.py
jerryuhoo Jun 23, 2023
03e5873
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 23, 2023
e511a06
Update SVS README.md
jerryuhoo Jun 23, 2023
f915e56
Shortened lines to fix CI
jerryuhoo Jun 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions egs2/TEMPLATE/asr1/db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ AMEBOSHI=
ITAKO=
NATSUME=
KIRITAN=
NAMINE=

# For only CMU TIR environment
if [[ "$(hostname)" == tir* ]]; then
Expand Down
25 changes: 25 additions & 0 deletions egs2/TEMPLATE/asr1/pyscripts/utils/check_align.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import argparse
import math
import os
import re
import sys

from espnet2.fileio.read_text import read_label
Expand Down Expand Up @@ -61,6 +62,18 @@ def compare(key, score, label):
pre_phn = phns[-1]
for p in phns:
if index >= len(label):
pattern = r"_[0]*"
key_name = re.split(pattern, key[:-5], 1)[-1]
print(
"Error in {}, copy this code to `get_error_dict`"
' in prep_segments.py under `if input_type == "xml"`.\n'
'"{}": [\n'
" lambda i, labels, segment, segments, threshold: "
"add_pause(labels, segment, segments, threshold)\n"
' if (labels[i].lyric == "{}" and labels[i - 1].lyric == "{}")\n'
" else (labels, segment, segments, False),\n"
"],".format(key, key_name, score[i][2], score[i - 1][2])
)
raise ValueError("Lyrics are longer than phones in {}".format(key))
elif label[index][2] == p:
index += 1
Expand All @@ -71,6 +84,18 @@ def compare(key, score, label):
)
)
if index != len(label):
pattern = r"_[0]*"
key_name = re.split(pattern, key[:-5], 1)[-1]
print(
"Error in {}, copy this code to `get_error_dict` in prep_segments.py"
' under `if input_type == "hts"`.\n'
'"{}": [\n'
" lambda i, labels, segment, segments, threshold: "
"add_pause(labels, segment, segments, threshold)\n"
' if (labels[i].label_id == "{}" and labels[i - 1].label_id == "{}")\n'
" else (labels, segment, segments, False),\n"
"],".format(key, key_name, label[index][2], label[index - 1][2])
)
raise ValueError("Phones are longer than lyrics in {}.".format(key))
return score

Expand Down