Spaces:
Runtime error
Runtime error
Commit
·
c5849d7
1
Parent(s):
955876e
Fix output_root -> self.output_root2
Browse files- cfg/config.yaml +2 -2
- remfx/datasets.py +3 -3
cfg/config.yaml
CHANGED
@@ -26,7 +26,7 @@ datamodule:
|
|
26 |
_target_: remfx.datasets.VocalSet
|
27 |
sample_rate: ${sample_rate}
|
28 |
root: ${oc.env:DATASET_ROOT}
|
29 |
-
output_root: ${oc.env:OUTPUT_ROOT}
|
30 |
chunk_size_in_sec: 6
|
31 |
mode: "train"
|
32 |
effect_types: ${effects.train_effects}
|
@@ -34,7 +34,7 @@ datamodule:
|
|
34 |
_target_: remfx.datasets.VocalSet
|
35 |
sample_rate: ${sample_rate}
|
36 |
root: ${oc.env:DATASET_ROOT}
|
37 |
-
output_root: ${oc.env:OUTPUT_ROOT}
|
38 |
chunk_size_in_sec: 6
|
39 |
mode: "val"
|
40 |
effect_types: ${effects.val_effects}
|
|
|
26 |
_target_: remfx.datasets.VocalSet
|
27 |
sample_rate: ${sample_rate}
|
28 |
root: ${oc.env:DATASET_ROOT}
|
29 |
+
output_root: ${oc.env:OUTPUT_ROOT}/train
|
30 |
chunk_size_in_sec: 6
|
31 |
mode: "train"
|
32 |
effect_types: ${effects.train_effects}
|
|
|
34 |
_target_: remfx.datasets.VocalSet
|
35 |
sample_rate: ${sample_rate}
|
36 |
root: ${oc.env:DATASET_ROOT}
|
37 |
+
output_root: ${oc.env:OUTPUT_ROOT}/val
|
38 |
chunk_size_in_sec: 6
|
39 |
mode: "val"
|
40 |
effect_types: ${effects.val_effects}
|
remfx/datasets.py
CHANGED
@@ -207,7 +207,7 @@ class VocalSet(Dataset):
|
|
207 |
print("Processing files...")
|
208 |
if render_files:
|
209 |
if not self.output_root.exists():
|
210 |
-
self.output_root.mkdir()
|
211 |
if not output_mode_path.exists():
|
212 |
output_mode_path.mkdir()
|
213 |
for i, audio_file in tqdm(enumerate(self.files)):
|
@@ -253,8 +253,8 @@ class VocalSet(Dataset):
|
|
253 |
|
254 |
def __getitem__(self, idx):
|
255 |
# Load audio
|
256 |
-
input_file = self.
|
257 |
-
target_file = self.
|
258 |
input, sr = torchaudio.load(input_file)
|
259 |
target, sr = torchaudio.load(target_file)
|
260 |
return (input, target, "")
|
|
|
207 |
print("Processing files...")
|
208 |
if render_files:
|
209 |
if not self.output_root.exists():
|
210 |
+
self.output_root.mkdir(parents=True)
|
211 |
if not output_mode_path.exists():
|
212 |
output_mode_path.mkdir()
|
213 |
for i, audio_file in tqdm(enumerate(self.files)):
|
|
|
253 |
|
254 |
def __getitem__(self, idx):
|
255 |
# Load audio
|
256 |
+
input_file = self.output_root / str(idx) / "input.wav"
|
257 |
+
target_file = self.output_root / str(idx) / "target.wav"
|
258 |
input, sr = torchaudio.load(input_file)
|
259 |
target, sr = torchaudio.load(target_file)
|
260 |
return (input, target, "")
|