Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
loubbrad committed Mar 22, 2024
1 parent 533472f commit 4f866c4
Show file tree
Hide file tree
Showing 9 changed files with 114 additions and 556 deletions.
28 changes: 14 additions & 14 deletions amt/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,12 @@ def __init__(
noise_ratio: float = 0.95,
reverb_ratio: float = 0.95,
applause_ratio: float = 0.01,
bandpass_ratio: float = 0.15,
bandpass_ratio: float = 0.15,
distort_ratio: float = 0.15,
reduce_ratio: float = 0.01,
detune_ratio: float = 0.1,
detune_max_shift: float = 0.15,
spec_aug_ratio: float = 0.5,
detune_ratio: float = 0.1,
detune_max_shift: float = 0.15,
spec_aug_ratio: float = 0.5,
):
super().__init__()
self.tokenizer = AmtTokenizer()
Expand Down Expand Up @@ -269,18 +269,18 @@ def __init__(
time_mask_param=1000, iid_masks=True
),
)

def get_params(self):
return {
"noise_ratio": self.noise_ratio,
"reverb_ratio": self.reverb_ratio,
"applause_ratio": self.applause_ratio,
"bandpass_ratio": self.bandpass_ratio,
"distort_ratio": self.distort_ratio,
"reduce_ratio": self.reduce_ratio,
"detune_ratio": self.detune_ratio,
"detune_max_shift": self.detune_max_shift,
"spec_aug_ratio": self.spec_aug_ratio,
"noise_ratio": self.noise_ratio,
"reverb_ratio": self.reverb_ratio,
"applause_ratio": self.applause_ratio,
"bandpass_ratio": self.bandpass_ratio,
"distort_ratio": self.distort_ratio,
"reduce_ratio": self.reduce_ratio,
"detune_ratio": self.detune_ratio,
"detune_max_shift": self.detune_max_shift,
"spec_aug_ratio": self.spec_aug_ratio,
}

def _get_paths(self, dir_path):
Expand Down
1 change: 1 addition & 0 deletions amt/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

# Occasionally the worker util goes to 0 for some reason, debug this


def get_wav_mid_segments(
audio_path: str,
mid_path: str = "",
Expand Down
Loading

0 comments on commit 4f866c4

Please sign in to comment.