Remove insignificant test assets
Open
Nobody has claimed this yet.
help wanted
module: tests
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 799
- Avg merge
- 58m
- Merged PRs (30d)
- 3
Description
@astaff had introduced guideline for test assets in https://github.com/pytorch/audio/pull/759 and we can get rid of the following existing assets.
-
100Hz_44100Hz_16bit_05sec.wavsine wave, should be replaced by on-the-fly generation. -
440Hz_44100Hz_16bit_05sec.wavsine wave, should be replaced by on-the-fly generation. -
CommonVoice/cv-corpus-4-2019-12-10/tt/clips/common_voice_tt_00000000.mp3whitenoise, should be converted to wav so that test does not require mp3 decoder. -
dtmf_30s_stereo.mp3not used. -
genres/noise/noise.0000.wavshould be replaced by on-the-fly generation. -
kaldi_file.wavsine wave only contains 20 samples and I do not think this is appropriate for test. -
kaldi_file_8000.wavsine wave, should prefer on-the-fly generation. -
sinewave.wavsine wave, should prefer on-the-fly generation. -
steam-train-whistle-daniel_simon.mp3should be replaced bysteam-train-whistle-daniel_simon.wav -
test.wavfile generated duringtest_io.pyaccidentally checked in -
waves_yesno/0_1_0_1_0_1_1_0.wav -
whitenoise_1min.mp3should be replaced by on-the-fly generation. -
whitenoise.mp3should be replaced by on-the-fly generation. -
whitenoise.wavshould be replaced by on-the-fly generation.
General Direction for replacing assets with on-the-fly generation
- Create Tensor
common_utils.get_sinusoid
common_utils.get_whitenoise
- Get temporary file path
self.get_temp_path('foo.wav')
# suppose this class is composed of `common_utils.TempDirMixin`
- Save wav file
common_utils.save_wav(path, data)
- Load wav file
common_utils.load_wav(path)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the test suite for kaldi_file.wav, kaldi_file_8000.wav, and sinewave.wav, then inspect the relevant uses of common_utils.get_sinusoid, save_wav, and load_wav. Replace the remaining checked-in assets with temporary, generated WAV files and remove assets that are no longer used; run the affected tests to confirm they still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100