Skip to content

Commit 28f89aa

Browse files
committed
Finalize 0.0.1
1 parent 2c2acf8 commit 28f89aa

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

config/enhancer_stage1.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
lcfm_training_mode: ae
22
load_fg_only: true
33
batch_size_per_gpu: 16
4-
# Uncomment this if you are training your model
5-
# denoiser_run_dir: runs/denoiser
4+
denoiser_run_dir: runs/denoiser

config/enhancer_stage2.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ training_seconds: 3.0
44
gan_training_start_step: null
55
lcfm_z_scale: 6
66
praat_augment_prob: 0.2
7-
# Uncomment this if you are training your model
8-
# enhancer_stage1_run_dir: runs/enhancer_stage1
9-
# denoiser_run_dir: runs/denoiser
7+
denoiser_run_dir: runs/denoiser
8+
enhancer_stage1_run_dir: runs/enhancer_stage1

resemble_enhance/data/distorter/custom.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ def _sample_rir(self):
4242
return rir
4343

4444
def apply(self, wav, sr):
45+
# ref: https://github.com/haoheliu/voicefixer_main/blob/b06e07c945ac1d309b8a57ddcd599ca376b98cd9/dataloaders/augmentation/magical_effects.py#L158
46+
4547
if len(self.rir_paths) == 0:
4648
return wav
4749

resemble_enhance/enhancer/__main__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import argparse
22
import random
3+
import time
34
from pathlib import Path
45

56
import torch
@@ -70,6 +71,8 @@ def main():
7071

7172
args = parser.parse_args()
7273

74+
start_time = time.perf_counter()
75+
7376
run_dir = args.run_dir
7477

7578
paths = sorted(args.in_dir.glob(f"**/*{args.suffix}"))
@@ -111,6 +114,10 @@ def main():
111114
out_path.parent.mkdir(parents=True, exist_ok=True)
112115
torchaudio.save(out_path, hwav[None], sr)
113116

117+
# Cool emoji effect saying the job is done
118+
elapsed_time = time.perf_counter() - start_time
119+
print(f"🌟 Enhancement done! {len(paths)} files processed in {elapsed_time:.2f}s")
120+
114121

115122
if __name__ == "__main__":
116123
main()

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ def shell(*args):
1010
return out.decode("ascii").strip()
1111

1212

13-
def write_version(version_core, dev=True):
14-
if dev:
13+
def write_version(version_core, pre_release=True):
14+
if pre_release:
1515
last_commit_time = shell("git", "log", "-1", "--format=%cd", "--date=iso-strict")
1616
last_commit_time = datetime.strptime(last_commit_time, "%Y-%m-%dT%H:%M:%S%z")
1717
last_commit_time = last_commit_time.astimezone(timezone.utc)
@@ -36,7 +36,7 @@ def write_version(version_core, dev=True):
3636
setup(
3737
name="resemble-enhance",
3838
python_requires=">=3.10",
39-
version=write_version("0.0.1"),
39+
version=write_version("0.0.1", pre_release=False),
4040
description="Speech denoising and enhancement with deep learning",
4141
long_description=long_description,
4242
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)