add max phones env var
Browse files- libritts-aligned.py +2 -1
libritts-aligned.py
CHANGED
@@ -24,6 +24,7 @@ _PHONESET = "arpabet"
|
|
24 |
_VERBOSE = os.environ.get("LIBRITTS_VERBOSE", True)
|
25 |
_MAX_WORKERS = os.environ.get("LIBRITTS_MAX_WORKERS", cpu_count())
|
26 |
_MAX_WORKERS = int(_MAX_WORKERS)
|
|
|
27 |
_PATH = os.environ.get("LIBRITTS_PATH", os.environ.get("HF_DATASETS_CACHE", None))
|
28 |
_DOWNLOAD_SPLITS = os.environ.get(
|
29 |
"LIBRITTS_DOWNLOAD_SPLITS",
|
@@ -343,7 +344,7 @@ class LibriTTSAlign(datasets.GeneratorBasedBuilder):
|
|
343 |
for i, row in ds.iterrows():
|
344 |
# 10kB is the minimum size of a wav file for our purposes
|
345 |
if Path(row["audio"]).stat().st_size >= 10_000:
|
346 |
-
if len(row["phones"]) <
|
347 |
result = {
|
348 |
"id": row["basename"],
|
349 |
"speaker": row["speaker"],
|
|
|
24 |
_VERBOSE = os.environ.get("LIBRITTS_VERBOSE", True)
|
25 |
_MAX_WORKERS = os.environ.get("LIBRITTS_MAX_WORKERS", cpu_count())
|
26 |
_MAX_WORKERS = int(_MAX_WORKERS)
|
27 |
+
_MAX_PHONES = os.environ.get("LIBRITTS_MAX_PHONES", 512)
|
28 |
_PATH = os.environ.get("LIBRITTS_PATH", os.environ.get("HF_DATASETS_CACHE", None))
|
29 |
_DOWNLOAD_SPLITS = os.environ.get(
|
30 |
"LIBRITTS_DOWNLOAD_SPLITS",
|
|
|
344 |
for i, row in ds.iterrows():
|
345 |
# 10kB is the minimum size of a wav file for our purposes
|
346 |
if Path(row["audio"]).stat().st_size >= 10_000:
|
347 |
+
if len(row["phones"]) < _MAX_PHONES:
|
348 |
result = {
|
349 |
"id": row["basename"],
|
350 |
"speaker": row["speaker"],
|