Skip to content

Commit

Permalink
Updated model, created python package, and released LJ-Speech model
Browse files Browse the repository at this point in the history
  • Loading branch information
bshall committed Nov 12, 2020
1 parent 7636732 commit fff05be
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ tar -xvjf LJSpeech-1.1.tar.bz2
4. Download the train split here and extract it in the root directory of the repo.
5. Extract Mel spectrograms and preprocess audio:
```
python preprocess.py in_dir=path/to/LJSpeech-1.1
python preprocess.py in_dir=path/to/LJSpeech-1.1 out_dir=datasets/LJSpeech-1.1
```
6. Train the model:
```
python train.py checkpoint_dir=ljspeech
python train.py checkpoint_dir=ljspeech dataset_dir=datasets/LJSpeech-1.1
```

## Pretrained Models
Expand Down
2 changes: 1 addition & 1 deletion preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def process_wav(wav_path, out_path, cfg):
@hydra.main(config_path="univoc/config", config_name="preprocess")
def preprocess_dataset(cfg):
in_dir = Path(utils.to_absolute_path(cfg.in_dir))
out_dir = Path(utils.to_absolute_path("datasets"))
out_dir = Path(utils.to_absolute_path(cfg.out_dir))
out_dir.mkdir(parents=True, exist_ok=True)

executor = ProcessPoolExecutor(max_workers=cpu_count())
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ numpy>=1.19.2
librosa>=0.8.0
tqdm>=4.50
hydra-core>=1.0.3
pyloudnorm>=0.1.0
tensorboard>=2.3.0
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def train_model(cfg):
else:
global_step = 0

dataset_root = Path(utils.to_absolute_path("datasets"))
dataset_root = Path(utils.to_absolute_path(cfg.dataset_dir))
dataset = VocoderDataset(
dataset_root,
sample_frames=cfg.train.sample_frames,
Expand Down
3 changes: 2 additions & 1 deletion univoc/config/preprocess.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
defaults:
- config

in_dir: ???
in_dir: ???
out_dir: ???
3 changes: 2 additions & 1 deletion univoc/config/train.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ defaults:
- config

resume: false
checkpoint_dir: ???
checkpoint_dir: ???
dataset_dir: ???

0 comments on commit fff05be

Please sign in to comment.