-
Notifications
You must be signed in to change notification settings - Fork 739
Add wsj0mix dataset #895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add wsj0mix dataset #895
Conversation
f4186b6 to
e368349
Compare
e368349 to
a7f0e2a
Compare
|
as mentioned here, training on an open dataset like LibriMix would allow for more users to experiment with the dataset |
ace5b6b to
c871382
Compare
51f83e3 to
8763416
Compare
8763416 to
89c1c67
Compare
| def _load_audio(self, path) -> torch.Tensor: | ||
| waveform, sample_rate = torchaudio.load(path) | ||
| if sample_rate != self.sample_rate: | ||
| raise ValueError( | ||
| f"The dataset contains audio file of sample rate {sample_rate}. " | ||
| "Where the requested sample rate is {self.sample_rate}." | ||
| ) | ||
| return waveform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this function serve beyond wrapping load? Ensures sample rate is the same?
|
|
||
| from . import wsj0mix | ||
|
|
||
| Batch = namedtuple("Batch", ["mix", "src", "mask"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name may be misleading?
vincentqb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments, but LGTM
| self.root = Path(root) | ||
| self.sample_rate = sample_rate | ||
| self.mix_dir = (self.root / "mix").resolve() | ||
| self.src_dirs = [(self.root / f"s{i+1}").resolve() for i in range(num_speakers)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could use os path join
|
thanks! |
#897
test/torchaudio_unittest