1. 04 Mar, 2023 1 commit
  2. 03 Mar, 2023 3 commits
  3. 02 Mar, 2023 5 commits
  4. 01 Mar, 2023 6 commits
  5. 28 Feb, 2023 3 commits
  6. 27 Feb, 2023 5 commits
  7. 25 Feb, 2023 1 commit
  8. 24 Feb, 2023 5 commits
  9. 23 Feb, 2023 5 commits
    • moto's avatar
      Replace c10::Dict with std::map in StreamReader/Writer (#3092) · c3310018
      moto authored
      Summary:
      This commit is kind of clean up and preparation for future development.
      
      We plan to pass around more complicated objects among StreamReader and StreamWriter, and TorchBind is not expressive enough for defining intermediate object, so we want to use PyBind11 for binding StreamReader/Writer.
      
      PyBind11 converts Python dict into std::map, while TorchBind converts it into c10::Dict. Because of this descrepancy, conversion from c10::Dict to std::map have to happen in multiple places, and this makes the binding code thicker as it requires to wrapper methods.
      
      Using std::map reduces the number of wrapper methods / conversions, because the same method can be bound for file-like object and the others.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/3092
      
      Reviewed By: nateanl
      
      Differential Revision: D43524808
      
      Pulled By: mthrok
      
      fbshipit-source-id: f7467c66ccd37dbf4abc337bbb18ffaac21a0058
      c3310018
    • G. Sun's avatar
      Add TCPGen context-biasing Conformer RNN-T (#2890) · 1ed330b5
      G. Sun authored
      Summary:
      This commit adds the implementation of the tree-constrained pointer generator (TCPGen) for contextual biasing.
      
      An example for Librispeech can be found in audio/examples/asr/librispeech_biasing.
      
      Maintainer's note (mthrok):
      It seems that TrieNode should be better typed as tuple, but changing the implementation from list to tuple
      could cause some issue without running the code, so the code is not changed, though the annotation uses tuple.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2890
      
      Reviewed By: nateanl
      
      Differential Revision: D43171447
      
      Pulled By: mthrok
      
      fbshipit-source-id: 372bb077d997d720401dbf2dbfa131e6a958e37e
      1ed330b5
    • mthrok's avatar
      Remove Tensor binding from StreamReader (#3093) · d3c9295c
      mthrok authored
      Summary:
      Remove the Tensor input support from StreamReader
      
      Follow up of https://github.com/pytorch/audio/pull/3086
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/3093
      
      Reviewed By: xiaohui-zhang
      
      Differential Revision: D43526066
      
      Pulled By: mthrok
      
      fbshipit-source-id: 57ba4866c413649173e1c2c3b23ba7de3231b7bc
      d3c9295c
    • moto's avatar
      Deprecate the use of Tensor as a mean of passing byte string (#3086) · a26c2f27
      moto authored
      Summary:
      The same functionality can be achieved with passing io.BytesIO to the constructor.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/3086
      
      Reviewed By: nateanl
      
      Differential Revision: D43500360
      
      Pulled By: mthrok
      
      fbshipit-source-id: 2c6f37d100f50553b283c75c04fe57c8f9c07dc9
      a26c2f27
    • moto's avatar
      Update CTCDecoder static build deprecation message (#3089) · 3b75b74f
      moto authored
      Summary:
      1. Fix spacing.
      2. Move it to after successful import
      3. Add link to the announcement issue
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/3089
      
      Reviewed By: nateanl, xiaohui-zhang
      
      Differential Revision: D43514075
      
      Pulled By: mthrok
      
      fbshipit-source-id: 3b2a24c65c63dab8c12c9c6aa1942a8354b2c0f1
      3b75b74f
  10. 22 Feb, 2023 3 commits
  11. 21 Feb, 2023 1 commit
    • Chin-Yun Yu's avatar
      Fix contiguous error when backpropagating through lfilter (#3080) · 6ab1325a
      Chin-Yun Yu authored
      Summary:
      I encountered the following errors when using the filter with gradients being enabled.
      
      ```sh
      Traceback (most recent call last):
        File "/home/ycy/working/audio/test_backward.py", line 20, in <module>
          loss.backward()
        File "/home/ycy/miniconda3/envs/nightly/lib/python3.10/site-packages/torch/_tensor.py", line 488, in backward
          torch.autograd.backward(
        File "/home/ycy/miniconda3/envs/nightly/lib/python3.10/site-packages/torch/autograd/__init__.py", line 197, in backward
          Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
      RuntimeError: Expected input_signal_windows.is_contiguous() && a_coeff_flipped.is_contiguous() && padded_output_waveform.is_contiguous() to be true, but got false.  (Could this error message be improved?  If so, please report an enhancement request to PyTorch.)
      ```
      This can happen if the outputs from lfilter was used by other operations.
      
      ### How to reproduce
      The following script can reproduce the error on the stable and nightly versions.
      
      ```python
      import torch
      import torch.nn.functional as F
      from torchaudio.functional import lfilter
      
      a = torch.rand(250, 26, requires_grad=True)
      b = torch.ones(250, 26, requires_grad=True)
      x = torch.rand(250, 1024, requires_grad=True)
      w = torch.eye(1024).unsqueeze(1)
      
      y = lfilter(x, a, b, False)
      y = F.conv_transpose1d(
          y.t().unsqueeze(0),
          w,
          stride=256,
      ).squeeze()
      print(y.shape)
      target = torch.ones_like(y)
      loss = torch.nn.functional.mse_loss(y, target)
      loss.backward()
      ```
      
      ### Cause
      
      The inner call of differentiable IIR in the backward pass needs to ensure the input is contiguous. Adding a `contiguous()` call solve the problem.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/3080
      
      Reviewed By: xiaohui-zhang
      
      Differential Revision: D43466612
      
      Pulled By: mthrok
      
      fbshipit-source-id: 375e0a147988656da47ac8397f7de6eae512a655
      6ab1325a
  12. 17 Feb, 2023 2 commits