Skip to content
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

Merged
merged 1 commit into from Oct 12, 2020
Merged

Add wsj0mix dataset #895

merged 1 commit into from Oct 12, 2020

Conversation

mthrok
Copy link
Collaborator

@mthrok mthrok commented Aug 28, 2020

#897

  • Add wsj0mix dataset
  • Add test to test/torchaudio_unittest

@mthrok mthrok mentioned this pull request Aug 28, 2020
14 tasks
@mthrok mthrok force-pushed the conv-tasnet-wsj0mix branch 2 times, most recently from f4186b6 to e368349 Compare September 1, 2020 17:09
@vincentqb
Copy link
Contributor

as mentioned here, training on an open dataset like LibriMix would allow for more users to experiment with the dataset

@mthrok mthrok changed the base branch from conv-tasnet to master September 28, 2020 19:06
@mthrok mthrok force-pushed the conv-tasnet-wsj0mix branch 2 times, most recently from 51f83e3 to 8763416 Compare October 6, 2020 20:39
Comment on lines +39 to +46
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
Copy link
Contributor

@vincentqb vincentqb Oct 12, 2020

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"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name may be misleading?

Copy link
Contributor

@vincentqb vincentqb left a 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)]
Copy link
Contributor

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

@mthrok mthrok merged commit 2d87913 into pytorch:master Oct 12, 2020
@mthrok mthrok deleted the conv-tasnet-wsj0mix branch October 12, 2020 20:27
@mthrok
Copy link
Collaborator Author

mthrok commented Oct 12, 2020

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants