1. 22 Apr, 2020 1 commit
  2. 20 Apr, 2020 2 commits
    • moto's avatar
      Improve lfilter speed (#564) · 27a0f765
      moto authored
      Before
      
      Total time: 13.7078
      
      ```
         722|    220501|      2.44247|  1.10769e-05| 17.82%|    for i_sample, o0 in enumerate(input_signal_windows.t()):
      (call)|         1|  6.36578e-05|  6.36578e-05|  0.00%|# /scratch/moto/pytorch/torch/tensor.py:460 __iter__
      (call)|    220500|      1.60566|  7.28191e-06| 11.71%|# /scratch/moto/pytorch/torch/tensor.py:474 <lambda>
         723|    220500|      1.86697|  8.46698e-06| 13.62%|        windowed_output_signal = padded_output_waveform[:, i_sample:(i_sample + n_order)]
         724|    220500|      1.94628|  8.82669e-06| 14.20%|        o0.addmv_(windowed_output_signal, a_coeffs_flipped, alpha=-1)
         725|    220500|         2.46|  1.11565e-05| 17.94%|        o0.div_(a_coeffs[0])
         726|         0|            0|            0|  0.00%|
         727|    220500|      3.37869|  1.53229e-05| 24.64%|        padded_output_waveform[:, i_sample + n_order - 1] = o0
      ```
      
      After
      
      Total time: 10.9667
      
      ```
         722|         1|   9.2268e-05|   9.2268e-05|  0.00%|    input_signal_windows.div_(a_coeffs[0])
         723|         1|  2.14577e-05|  2.14577e-05|  0.00%|    a_coeffs_flipped.div_(a_coeffs[0])
         724|    220501|      2.40216|  1.08941e-05| 21.90%|    for i_sample, o0 in enumerate(input_signal_windows.t()):
      (call)|         1|  5.84126e-05|  5.84126e-05|  0.00%|# /scratch/moto/pytorch/torch/tensor.py:460 __iter__
      (call)|    220500|      1.59821|   7.2481e-06| 14.57%|# /scratch/moto/pytorch/torch/tensor.py:474 <lambda>
         725|    220500|      1.82273|  8.26633e-06| 16.62%|        windowed_output_signal = padded_output_waveform[:, i_sample:(i_sample + n_order)]
         726|    220500|      1.84074|  8.34802e-06| 16.78%|        o0.addmv_(windowed_output_signal, a_coeffs_flipped, alpha=-1)
         727|    220500|       3.2952|  1.49442e-05| 30.05%|        padded_output_waveform[:, i_sample + n_order - 1] = o0
      ```
      27a0f765
    • Bhargav Kathivarapu's avatar
      Add dcshift to functional (#558) · 91e59231
      Bhargav Kathivarapu authored
      * Add dcshift to functional
      
      * Doc string change and remove inplace clamp
      
      * Minor Fix to dcshit and separate sox test refactoring
      
      * Minor change to limiter_gain type
      
      * adding dcshift to __all__ in functional
      91e59231
  3. 17 Apr, 2020 1 commit
  4. 16 Apr, 2020 1 commit
  5. 14 Apr, 2020 1 commit
    • moto's avatar
      Call torch.stft directly (#531) · 6304db75
      moto authored
      * Update requirements and travis installation
      
      * Drop support for 3.5 and add test for 3.8
      
      * Call torch.stft directly
      6304db75
  6. 09 Apr, 2020 1 commit
  7. 07 Apr, 2020 1 commit
    • moto's avatar
      Use fused op in lfilter (#517) · 86d54160
      moto authored
      This improves the speed of `lfilter` (and functions that use `lfilter`, such as `biquad`) by 10%.
      
      * Before (23.4369 seconds for `lfilter` call)
      
      Breakdown
      
      ```
         720|    220501|       4.4464|   2.0165e-05| 18.97%|    for i_sample, o0 in enumerate(input_signal_windows.t()):
      (call)|         1|  7.86781e-05|  7.86781e-05|  0.00%|# /scratch/moto/pytorch/torch/tensor.py:460 __iter__
      (call)|    220500|      2.72458|  1.23564e-05| 11.62%|# /scratch/moto/pytorch/torch/tensor.py:474 <lambda>
         721|    220500|      2.80982|   1.2743e-05| 11.99%|        windowed_output_signal = padded_output_waveform[:, i_sample:(i_sample + n_order)]
         722|    220500|      4.92106|  2.23177e-05| 21.00%|        o0.sub_(torch.mv(windowed_output_signal, a_coeffs_flipped))
         723|    220500|      3.72974|  1.69149e-05| 15.91%|        o0.div_(a_coeffs[0])
         724|         0|            0|            0|  0.00%|
         725|    220500|      4.77714|   2.1665e-05| 20.38%|        padded_output_waveform[:, i_sample + n_order - 1] = o0
      ```
      
      * After (20.8405 seconds for `lfilter` call)
      
      Breakdown
      
      ```
         720|    220501|      4.40834|  1.99924e-05| 21.15%|    for i_sample, o0 in enumerate(input_signal_windows.t()):
      (call)|         1|  7.31945e-05|  7.31945e-05|  0.00%|# /scratch/moto/pytorch/torch/tensor.py:460 __iter__
      (call)|    220500|      2.68595|  1.21812e-05| 12.89%|# /scratch/moto/pytorch/torch/tensor.py:474 <lambda>
         721|    220500|      2.97357|  1.34856e-05| 14.27%|        windowed_output_signal = padded_output_waveform[:, i_sample:(i_sample + n_order)]
         722|    220500|      2.63567|  1.19531e-05| 12.65%|        o0.addmv_(windowed_output_signal, a_coeffs_flipped)
         723|    220500|       3.4228|  1.55229e-05| 16.42%|        o0.div_(a_coeffs[0])
         724|         0|            0|            0|  0.00%|
         725|    220500|      4.68726|  2.12574e-05| 22.49%|        padded_output_waveform[:, i_sample + n_order - 1] = o0
      ```
      
      * Script
      
      ```python
      import pprofile
      
      import torch
      import torchaudio
      import torchaudio.functional as F
      
      def profile_biquad():
          waveform, sr = torchaudio.load('test/assets/100Hz_44100Hz_16bit_05sec.wav', normalization=True)
      
          prof = pprofile.Profile()
          with prof():
              F.equalizer_biquad(waveform, sr, 3000, 1, 0.707)
          prof.print_stats()
      
      profile_biquad()
      ```
      
      * See also
      
      https://github.com/pytorch/audio/issues/260#issuecomment-610074110
      86d54160
  8. 03 Apr, 2020 1 commit
  9. 31 Mar, 2020 1 commit
  10. 30 Mar, 2020 1 commit
  11. 25 Mar, 2020 1 commit
  12. 24 Mar, 2020 2 commits
  13. 17 Mar, 2020 1 commit
  14. 25 Feb, 2020 1 commit
  15. 29 Jan, 2020 1 commit
  16. 17 Jan, 2020 1 commit
  17. 13 Jan, 2020 2 commits
  18. 02 Jan, 2020 1 commit
  19. 27 Dec, 2019 1 commit
    • Karl Ostmo's avatar
      Fix several errors in tests run by Travis (#380) · 9801caf6
      Karl Ostmo authored
      * Declare file encoding to support special characters
      
      * fix missing utf_8_encoder error in Travis tests
      
      * Py 2.7 backwards-compat iterator
      
      * ensure integer argument to torch.nn.functional.pad
      
      * cast match.ceil result as integer
      9801caf6
  20. 26 Dec, 2019 2 commits
  21. 20 Dec, 2019 1 commit
    • David Pollack's avatar
      Improve lfilter functional (#374) · f3365ecf
      David Pollack authored
      
      
      * Simplify lfilter functional
      
      * use `torch.clamp` instead of `torch.min(..., torch.max(...))`
      * remove unneeded creation of ones tensor for previous method
      
      The current lfilter function uses min and max to essentially do a clamp
      function.  I changed the code to use clamp instead.  It is more readable
      than the previous version.
      
      FYI, if you want to keep the previous way, you could make a
      broadcastable tensor of size 1 instead of creating a tensor the size of
      the input.
      Signed-off-by: default avatarDavid Pollack <david@da3.net>
      
      * Parallelize waveform windows calculation
      
      I've parallelized the calculation of the waveform windows and also
      removed the inefficient calculation within the for-loop.
      Signed-off-by: default avatarDavid Pollack <david@da3.net>
      
      * Refactoring and minor readability changes
      Signed-off-by: default avatarDavid Pollack <david@da3.net>
      
      * Remove one more creation of a temporary tensor
      Signed-off-by: default avatarDavid Pollack <david@da3.net>
      f3365ecf
  22. 14 Dec, 2019 1 commit
  23. 03 Dec, 2019 1 commit
  24. 02 Dec, 2019 1 commit
  25. 22 Nov, 2019 1 commit
  26. 21 Nov, 2019 1 commit
  27. 20 Nov, 2019 1 commit
  28. 19 Nov, 2019 1 commit
  29. 18 Nov, 2019 3 commits
  30. 05 Nov, 2019 1 commit
  31. 01 Nov, 2019 1 commit
  32. 30 Oct, 2019 1 commit
  33. 21 Oct, 2019 1 commit
  34. 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