update
Browse files- nst_swedish_tts.py +5 -4
nst_swedish_tts.py
CHANGED
@@ -60,10 +60,10 @@ IGNORE_SENT = [
|
|
60 |
"det gläder oss självklart"
|
61 |
]
|
62 |
IGNORE_ID = [
|
63 |
-
"
|
64 |
]
|
65 |
# MAYBE_FIX = {
|
66 |
-
# "
|
67 |
# }
|
68 |
|
69 |
def read_with_soundfile(filename):
|
@@ -126,7 +126,7 @@ class NSTDataset(datasets.GeneratorBasedBuilder):
|
|
126 |
for line in text.readlines():
|
127 |
line = line.strip()
|
128 |
if line in IGNORE_SENT:
|
129 |
-
if
|
130 |
counter += 1
|
131 |
continue
|
132 |
else:
|
@@ -135,7 +135,8 @@ class NSTDataset(datasets.GeneratorBasedBuilder):
|
|
135 |
counter += 1
|
136 |
for file in filepath.glob("*.pcm"):
|
137 |
stem = file.stem
|
138 |
-
|
|
|
139 |
data, _ = read_with_soundfile(str(file))
|
140 |
yield stem, {
|
141 |
"audio": {
|
|
|
60 |
"det gläder oss självklart"
|
61 |
]
|
62 |
IGNORE_ID = [
|
63 |
+
"4913",
|
64 |
]
|
65 |
# MAYBE_FIX = {
|
66 |
+
# "4913": "en annan gång tar vi ett annat grepp"
|
67 |
# }
|
68 |
|
69 |
def read_with_soundfile(filename):
|
|
|
126 |
for line in text.readlines():
|
127 |
line = line.strip()
|
128 |
if line in IGNORE_SENT:
|
129 |
+
if f"{counter:04d}" in IGNORE_ID:
|
130 |
counter += 1
|
131 |
continue
|
132 |
else:
|
|
|
135 |
counter += 1
|
136 |
for file in filepath.glob("*.pcm"):
|
137 |
stem = file.stem
|
138 |
+
id = stem.split("_")[-1]
|
139 |
+
if is_pcm(str(file)) and not id in IGNORE_ID:
|
140 |
data, _ = read_with_soundfile(str(file))
|
141 |
yield stem, {
|
142 |
"audio": {
|