KEMBAR78
Rebase to master by yoyolicoris · Pull Request #9 · yoyolicoris/torchaudio · GitHub
Skip to content

Conversation

yoyolicoris
Copy link
Owner

No description provided.

vincentqb and others added 30 commits February 26, 2021 10:28
#1315)

* Test with batches of differing items

Issues that occur when different items in a batch influence one another
will not present when a batch is composed of identical items. When
checking the consistency of batched behavior, in order to catch these
issues items should be different.

Thus, use different items for the `functional` batch consistency tests
wherever possible.

* Generate different white noise in each channel

Don't duplicate a single channel multiple times. Since this is used for
testing, generate different noise in each channel so data leakage
between channels can be detected.

* Parameterize batch size in batch consistency tests

Rather than creating a batch of 3 items in each test and slicing it to
test two different batch sizes at once, parameterize the batch size on
the TestFunctional class itself. This will generate a separate set of
tests for each batch size (better isolating failures) and removes a
leaky abstraction where the test calling `assert_batch_consistencies`
had to know to give it a batch size greater than 1.

* Check inputs too, to catch in-place operations

Check inputs to the batch consistency operations too, to ensure any
in-place operations operate the same on items as batches - not just that
they output the same result.

* Use much shorter sample for phaser test

Using a 5-second signal for the phaser test takes a long time on CPU,
much longer than the other batch consistency tests. Use a shorter signal
instead.

* Load dual-channel wav for VAD test

The stereo wav has two channels, slightly offset, so they'll count as
different items.

* Load wav using common_utils, not torchaudio.load

* Test pitch frequency with different freqs per item

The pitch frequency batch test was using the same frequency for each
item, which may not catch data leakage between items within a batch. Use
different frequencies so these kinds of issues would be triggered, just
like the other batch consistency tests.

* Explain justification for single-item batch
Parameterize `test_create_fb` so each set of values are tested
independently. Also explicitly skip on older versions of librosa (< 0.7.2) when
`norm="slaney"`.
[ghstack-poisoned]

Co-authored-by: Jeff Hwang <jeffhwang@fb.com>
* Parameterize `test_sliding_window_cmn`

* Extract test naming function

* Pass a spectrogram to `F.sliding_window_cmn`

* Set manual seed for remaining rand calls in suite
* Refactor Kaldi compatibility tests

Co-authored-by: Jeff Hwang <jeffhwang@fb.com>
* Fix install location and suffix for Windows
`SOX_SIGNED_16BIT_TO_SAMPLE` and `SOX_SIGNED_32BIT_TO_SAMPLE` uses left shift on signed integers, (negative values) which is UB.
This PR replaces them (and other sox macros for `uint8` and `float` as well) with Tensor operations.
jcaw and others added 11 commits March 9, 2021 12:48
* Change the name of the specgram named `waveform`

`F.sliding_window_cmn` takes a spectrogram as input (of shape
`(..., freq, time)`). However, this spectrogram is named `waveform`.
This appears to be an error, so rename this (and the output tensor) to
reflect that both are spectrograms.

* Correct tensor description in docstring

The output tensor of `F.sliding_window_cmn` is also a spectrogram.
Update the description to reflect this.
@yoyolicoris yoyolicoris merged commit 68f551b into yoyolicoris:master Mar 16, 2021
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.