1. 30 Mar, 2020 3 commits
    • Vincent QB's avatar
      testing with sox only when sox is available (#419) · d63d851e
      Vincent QB authored
      * testing with sox only when sox is available.
      
      * use wav instead of mp3 for testing functions.
      
      * typo.
      
      * guard against not sox.
      
      * backends definition.
      
      * grouping backend functions into a separate file.
      
      * remove duplicated code.
      
      * requires sox.
      
      * replace by wav, requires sox.
      
      * require with scope.
      
      * undo alignment.
      
      * requires sox for these two, because of mp3.
      
      * no longer need first mp3.
      
      * cleaning.
      
      * new wav version of file.
      
      * flake8.
      
      * remove unnecessary load.
      
      * flake8.
      
      * lint.
      
      * lint.
      
      * revert formatting of file.
      
      * merging into common_utils.
      
      * docstring.
      
      * rename to common_utils.
      d63d851e
    • moto's avatar
      Remove __future__ from torachaudio (#479) · dbed5b11
      moto authored
      
      
      * Remove __future__ from torachaudio
      
      * remove double space
      Co-authored-by: default avatarVincent QB <vincentqb@users.noreply.github.com>
      dbed5b11
    • moto's avatar
      Remove PY2 related stuff from test (#478) · beb6e530
      moto authored
      beb6e530
  2. 25 Mar, 2020 2 commits
  3. 24 Mar, 2020 3 commits
  4. 23 Mar, 2020 1 commit
  5. 17 Mar, 2020 1 commit
  6. 13 Mar, 2020 1 commit
  7. 10 Mar, 2020 3 commits
  8. 06 Mar, 2020 1 commit
  9. 05 Mar, 2020 3 commits
  10. 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
  11. 25 Feb, 2020 1 commit
  12. 24 Feb, 2020 1 commit
  13. 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
  14. 20 Feb, 2020 1 commit
  15. 14 Feb, 2020 1 commit
  16. 12 Feb, 2020 1 commit
  17. 29 Jan, 2020 2 commits
  18. 22 Jan, 2020 2 commits
  19. 17 Jan, 2020 1 commit
  20. 16 Jan, 2020 3 commits
  21. 13 Jan, 2020 3 commits
  22. 09 Jan, 2020 3 commits
  23. 08 Jan, 2020 1 commit
    • peterjc123's avatar
      Add Windows CI (#394) · be5b2d56
      peterjc123 authored
      * [WIP] Add Windows CI
      
      * Remove cu_version
      
      * checkout_merge -> checkout
      
      * Add build script
      
      * Switch backend to soundfile
      
      * Remove soundfile as dependency
      
      * Rename jobs
      
      * Fix lint
      be5b2d56