Skip to content

Commit 15981e1

Browse files
committed
make a change on args
1 parent 542efaa commit 15981e1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ python preprocess.py VCTK-Corpus LibriTTS/train-clean-100 preprocessed
1414
### Train from scratch
1515

1616
```bash
17-
python train.py preprocessed preprocessed/metadata.json
17+
python train.py preprocessed
1818
```
1919

2020
### Generate waveforms

train.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ def parse_args():
2323
"""Parse command-line arguments."""
2424
parser = ArgumentParser()
2525
parser.add_argument("data_dir", type=str)
26-
parser.add_argument("metadata_path", type=str)
2726
parser.add_argument("--n_workers", type=int, default=8)
2827
parser.add_argument("--save_dir", type=str, default=".")
2928
parser.add_argument("--comment", type=str)
@@ -50,7 +49,6 @@ def parse_args():
5049

5150
def main(
5251
data_dir,
53-
metadata_path,
5452
n_workers,
5553
save_dir,
5654
comment,
@@ -75,7 +73,11 @@ def main(
7573

7674
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
7775
dataset = VocoderDataset(
78-
data_dir, metadata_path, frames_per_sample, frames_per_slice, bits
76+
data_dir,
77+
Path(data_dir) / "metadata.json",
78+
frames_per_sample,
79+
frames_per_slice,
80+
bits,
7981
)
8082
lengths = [
8183
trainlen := int((1 - valid_ratio) * len(dataset)),

0 commit comments

Comments
 (0)