1. 10 Mar, 2020 2 commits
    • Tomás Osório's avatar
      add batch test to TimeStretch (#459) · d3f967e9
      Tomás Osório authored
      d3f967e9
    • Tomás Osório's avatar
      Add fade (#449) · 9efc3503
      Tomás Osório authored
      
      
      * add basics for Fade
      
      * add fade possibilities: at start, end or both
      
      * add different types of fade
      
      * add docstrings, add overriding possibility
      
      * remove unnecessary logic
      
      * correct typing
      
      * agnostic to batch size or n_channels
      
      * add batch test to Fade
      
      * add transform to options
      
      * add test_script_module
      
      * add coherency with test batch
      
      * remove extra step for waveform_length
      
      * update docstring
      
      * add test to compare fade with sox
      
      * change name of fade_shape
      
      * update test fade vs sox with new nomenclature for fade_shape
      
      * add Documentation
      Co-authored-by: default avatarVincent QB <vincentqb@users.noreply.github.com>
      9efc3503
  2. 28 Feb, 2020 1 commit
    • moto's avatar
      Add test for InverseMelScale (#448) · babc24af
      moto authored
      
      
      * Inverse Mel Scale Implementation
      
      * Inverse Mel Scale Docs
      
      * Better working version.
      
      * GPU fix
      
      * These shouldn't go on git..
      
      * Even better one, but does not support JITability.
      
      * Remove JITability test
      
      * Flake8
      
      * n_stft is a must
      
      * minor clean up of initialization
      
      * Add librosa consistency test
      
      This PR follows up #366 and adds test for `InverseMelScale` (and `MelScale`) for librosa compatibility.
      
      For `MelScale` compatibility test;
      1. Generate spectrogram
      2. Feed the spectrogram to `torchaudio.transforms.MelScale` instance
      3. Feed the spectrogram to `librosa.feature.melspectrogram` function.
      4. Compare the result from 2 and 3 elementwise.
      Element-wise numerical comparison is possible because under the hood their implementations use the same algorith.
      
      For `InverseMelScale` compatibility test, it is more elaborated than that.
      1. Generate the original spectrogram
      2. Convert the original spectrogram to Mel scale using `torchaudio.transforms.MelScale` instance
      3. Reconstruct spectrogram using torchaudio implementation
      3.1. Feed the Mel spectrogram to `torchaudio.transforms.InverseMelScale` instance and get reconstructed spectrogram.
      3.2. Compute the sum of element-wise P1 distance of the original spectrogram and that from 3.1.
      4. Reconstruct spectrogram using librosa
      4.1. Feed the Mel spectrogram to `librosa.feature.inverse.mel_to_stft` function and get reconstructed spectrogram.
      4.2. Compute the sum of element-wise P1 distance of the original spectrogram and that from 4.1. (this is the reference.)
      5. Check that resulting P1 distance are in a roughly same value range.
      
      Element-wise numerical comparison is not possible due to the difference algorithms used to compute the inverse. The reconstructed spectrograms can have some values vary in magnitude.
      Therefore the strategy here is to check that P1 distance (reconstruction loss) is not that different from the value obtained using `librosa`. For this purpose, threshold was empirically chosen
      
      ```
      print('p1 dist (orig <-> ta):', torch.dist(spec_orig, spec_ta, p=1))
      print('p1 dist (orig <-> lr):', torch.dist(spec_orig, spec_lr, p=1))
      >>> p1 dist (orig <-> ta): tensor(1482.1917)
      >>> p1 dist (orig <-> lr): tensor(1420.7103)
      ```
      
      This value can vary based on the length and the kind of the signal being processed, so it was handpicked.
      
      * Address review feedbacks
      
      * Support arbitrary batch dimensions.
      
      * Add batch test
      
      * Use view for batch
      
      * fix sgd
      
      * Use negative indices and update docstring
      
      * Update threshold
      Co-authored-by: default avatarCharles J.Y. Yoon <jaeyeun97@gmail.com>
      babc24af
  3. 25 Feb, 2020 1 commit
  4. 24 Feb, 2020 1 commit
  5. 22 Feb, 2020 1 commit
    • Tomás Osório's avatar
      Adding Speech Command Dataset (#437) · 4d58bc46
      Tomás Osório authored
      
      
      * add speechcommand dataset and test
      
      * prepend the full path to each result
      
      * add missing param on docstring in walk_files
      
      * add file to run tests on SpeechCommand Dataset
      
      * reduce logic
      
      * update test on SpeechCommands
      
      * correct the indentation on docstring walk_files
      
      * flake8 compliance
      
      * change tuple type returned. move path split logic in load item.
      
      * typo in name.
      
      * redundant file path.
      
      * filter background noise.
      Co-authored-by: default avatarVincent QB <vincentqb@users.noreply.github.com>
      4d58bc46
  6. 20 Feb, 2020 1 commit
  7. 14 Feb, 2020 1 commit
  8. 22 Jan, 2020 2 commits
  9. 13 Jan, 2020 2 commits
  10. 09 Jan, 2020 1 commit
  11. 02 Jan, 2020 2 commits
  12. 26 Dec, 2019 2 commits
  13. 19 Dec, 2019 1 commit
    • Vincent QB's avatar
      Backend switch (#355) · 774ebc78
      Vincent QB authored
      * move sox inside function calls.
      
      * add backend switch mechanism.
      
      * import sox at runtime, not import.
      
      * add backend list.
      
      * backend tests.
      
      * creating hidden modules for backend.
      
      * naming backend same as file: soundfile.
      
      * remove docstring in backend file.
      
      * test soundfile info.
      
      * soundfile doesn't support int64.
      
      * adding test for wav file.
      
      * error with incorrect parameter instead of silent ignore.
      
      * adding test across backend. using float32 as done in sox.
      
      * backend guard decorator.
      774ebc78
  14. 18 Dec, 2019 1 commit
  15. 03 Dec, 2019 1 commit
  16. 02 Dec, 2019 1 commit
  17. 21 Nov, 2019 1 commit
  18. 20 Nov, 2019 1 commit
  19. 18 Nov, 2019 2 commits
  20. 06 Nov, 2019 2 commits
  21. 01 Nov, 2019 1 commit
  22. 31 Oct, 2019 1 commit
  23. 30 Oct, 2019 2 commits
  24. 29 Oct, 2019 1 commit
  25. 23 Oct, 2019 1 commit
  26. 25 Sep, 2019 1 commit
    • engineerchuan's avatar
      Fix mel filter bank (#294) · 02ce049c
      engineerchuan authored
      * Fixed create_fb_matrix filter bank behavior for fmin/fmax
      * add better test for f_min close to f_max
      * added one more test for f_min > f_max
      * adding one more test
      02ce049c
  27. 20 Sep, 2019 1 commit
  28. 19 Sep, 2019 2 commits
    • engineerchuan's avatar
      Fix lfilter for GPU machine (#291) · e3024341
      engineerchuan authored
      * Ensure that lfilter works with GPU
      * Add option to load on different device
      * Debugging tests of lfilter on GPU
      * allowing arbitrary types into lfilter
      e3024341
    • Vincent QB's avatar
      Compute deltas (#268) · 401e7aee
      Vincent QB authored
      * compute deltas.
      * multichannel, and random test.
      * documentation.
      * feedback. changing name of window to win_length.
      * passing padding mode.
      401e7aee
  29. 18 Sep, 2019 1 commit
    • engineerchuan's avatar
      Make lfilter, and related filters, available (#275) · 8273c3f4
      engineerchuan authored
      * Add basic low pass filtering
      * Add highpass filtering
      * More tests of IIR vs FIR
      * Implement convolve function, add tests
      * Move lfilter and convolve into functional, more tests
      * added additional documentation for convolve and lfilter, renamed functional_filtering to functional_sox_convenience
      * Follow naming convention for sample rate in functional
      * fix failing vctk manifest test to account for adding more test audios into assets
      * Adding documentation for lfilter, biquad, highpass_biquad, lowpass_biquad
      * added matrix based implementation of lfilter
      * adding python lfilter implementation
      * factor out biquad, lowpass, highpass to sox compatibility
      8273c3f4
  30. 20 Aug, 2019 1 commit
  31. 16 Aug, 2019 1 commit