1. 08 Feb, 2023 3 commits
    • moto's avatar
      Build doc on GHA (#3043) · a0f8af4b
      moto authored
      Summary:
      The first step to migrate doc build to GHA.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/3043
      
      Reviewed By: xiaohui-zhang
      
      Differential Revision: D43110816
      
      Pulled By: mthrok
      
      fbshipit-source-id: 91de5f3ac567188e7030f14c2827a202a1901f1a
      a0f8af4b
    • moto's avatar
      Suppres warning about archive timestamp (#3044) · b4c66d1f
      moto authored
      Summary:
      Currently, for each third party library checked out with ExternalProject_Add, the following warning is shown.
      
      This commit set the policy so that the warning is not shown.
      
      ```
      CMake Warning (dev) at ci_env/lib/python3.10/site-packages/cmake/data/share/cmake-3.25/Modules/ExternalProject.cmake:3075 (message):
        The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
        not set.  The policy's OLD behavior will be used.  When using a URL
        download, the timestamps of extracted files should preferably be that of
        the time of extraction, otherwise code that depends on the extracted
        contents might not be rebuilt if the URL changes.  The OLD behavior
        preserves the timestamps from the archive instead, but this is usually not
        what you want.  Update your project to the NEW behavior or specify the
        DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
        robustness issue.
      ```
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/3044
      
      Reviewed By: xiaohui-zhang
      
      Differential Revision: D43110818
      
      Pulled By: mthrok
      
      fbshipit-source-id: d2e20c9fdbbeeedb5ad546fe32dbda28c5bdd431
      b4c66d1f
    • DanilBaibak's avatar
      Switch to Nova MacOS Conda (#2908) · de54d864
      DanilBaibak authored
      Summary:
      Switch to Nova M1 Conda
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2908
      
      Reviewed By: seemethere, osalpekar
      
      Differential Revision: D43093605
      
      Pulled By: DanilBaibak
      
      fbshipit-source-id: 9e44f26cfb87e277c3808ee59f50218b4629e86e
      de54d864
  2. 07 Feb, 2023 2 commits
  3. 06 Feb, 2023 1 commit
  4. 04 Feb, 2023 2 commits
  5. 03 Feb, 2023 1 commit
    • moto's avatar
      Add Linux GPU unit tests on GHA (#3029) · 6bdd3830
      moto authored
      Summary:
      Add GitHub Action-based GPU test jobs.
      - It seems that there is 2 hour upper cap so only running CUDA/GPU tests.
      - Since Kaldi related features are not available, they are disabled.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/3029
      
      Reviewed By: hwangjeff
      
      Differential Revision: D42983800
      
      Pulled By: mthrok
      
      fbshipit-source-id: 47fefe39c635d1c73ad6799ddacefd2666fe5403
      6bdd3830
  6. 02 Feb, 2023 2 commits
  7. 01 Feb, 2023 5 commits
  8. 31 Jan, 2023 1 commit
    • Moto Hira's avatar
      Remove unnecessary AVFrame allocation (#3021) · 0709cadc
      Moto Hira authored
      Summary:
      Pull Request resolved: https://github.com/pytorch/audio/pull/3021
      
      When input format and encode format is different in StreamWriter, filter for format conversion is inserted.
      
      A temporary AVFilter (`dst_frame`) is used for this case,
      but FilterGraph handles the memory allocation,
      so there is no need to perform allocation by ourselves.
      
      This `dst_frame` is otherwise not used, so we do not have to allocate memory at all.
      This commit removes the unnecessary memory allocation at all.
      
      Reviewed By: xiaohui-zhang
      
      Differential Revision: D42865042
      
      fbshipit-source-id: 2673b06de1e905dc73a11e2ec1cc6ce7b525d451
      0709cadc
  9. 30 Jan, 2023 2 commits
    • Yan Li's avatar
      Fix hybrid demucs tutorial for CUDA (#3017) · da9d1627
      Yan Li authored
      Summary:
      Currently there will be a few errors when this tutorial is run with a CUDA device.
      
      The reasons being:
      - The source audio waveform is not properly moved to the GPU. The `to()` method is not in-place for Tensors, so we need to assign the return value of the method call to the variable (otherwise the Tensor would still be on the CPU).
      - When performing further analysis and displaying of the output audio, we need to move them back from the GPU to the CPU. This is because some of the functions we call require the Tensor to be on the CPU (e.g. `stft()` and `bss_eval_sources()`).
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/3017
      
      Reviewed By: mthrok
      
      Differential Revision: D42828526
      
      Pulled By: nateanl
      
      fbshipit-source-id: c28bc855e79e3363a011f4a35a69aae1764e7762
      da9d1627
    • moto's avatar
      Add get_build_config ffmpeg utility function (#3014) · 635d8cff
      moto authored
      Summary:
      We often need to look at which FFmpeg was found and linked when debugging an issue.
      
      Version number is often not enough but there is no easy way to find where the library was found either.
      
      This commit adds utility function that prints the build time configuration.
      
      It helps to distinguish if the linked FFmpeg is the one from binary distribution built in CI or locally built.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/3014
      
      Reviewed By: hwangjeff
      
      Differential Revision: D42794952
      
      Pulled By: mthrok
      
      fbshipit-source-id: 91ed358fde8cfe9d6d950f34742b1722e729cf4e
      635d8cff
  10. 27 Jan, 2023 3 commits
  11. 26 Jan, 2023 3 commits
  12. 24 Jan, 2023 1 commit
  13. 23 Jan, 2023 3 commits
  14. 22 Jan, 2023 1 commit
    • moto's avatar
      Make StreamReader return PTS (#2975) · 0dd59e0d
      moto authored
      Summary:
      This commit makes `StreamReader` report PTS (presentation time stamp) of the returned chunk as well.
      
      Example
      
      ```python
      from torchaudio.io import StreamReader
      
      s = StreamReader(...)
      s.add_video_stream(...)
      for (video_chunk, ) in s.stream():
          # video_chunk is Torch tensor type but has extra attribute of PTS
          print(video_chunk.pts)  # reports the PTS of the first frame of the video chunk.
      ```
      
      For the backward compatibility, we introduce a `_ChunkTensor`, that is a composition
      of Tensor and metadata, but works like a normal tensor in PyTorch operations.
      
      The implementation of `_ChunkTensor` is based on [TrivialTensorViaComposition](https://github.com/albanD/subclass_zoo/blob/0eeb1d68fb59879029c610bc407f2997ae43ba0a/trivial_tensors.py#L83).
      
      It was also suggested to attach metadata directly to Tensor object,
      but the possibility to have the collision on torchaudio's metadata and new attributes introduced in
      PyTorch cannot be ignored, so we use Tensor subclass implementation.
      
      If any unexpected issue arise from metadata attribute name collision, client code can
      fetch the bare Tensor and continue.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2975
      
      Reviewed By: hwangjeff
      
      Differential Revision: D42526945
      
      Pulled By: mthrok
      
      fbshipit-source-id: b4e9422e914ff328421b975120460f3001268f35
      0dd59e0d
  15. 20 Jan, 2023 4 commits
  16. 19 Jan, 2023 3 commits
    • Zhaoheng Ni's avatar
      Add modularized SSL training recipe (#2876) · 2eaefe27
      Zhaoheng Ni authored
      Summary:
      TorchAudio currently has one training recipe for HuBET + LibriSpeech pre-training. It may not suit well when users want to use customized dataset, or use a new training objective (such as contrastive loss in Wav2Vec2). The PR addresses the issue by providing a modularized training recipe for audio self-supervised learning. Users can inject customized model module, loss function, optimizer, lr scheduler, and datamodule for training a SSL model.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2876
      
      Reviewed By: hwangjeff
      
      Differential Revision: D42617414
      
      Pulled By: nateanl
      
      fbshipit-source-id: 6413df45a9d106ed1d5ff830bf628c54368c5792
      2eaefe27
    • hwangjeff's avatar
      Simplify train step in Conformer RNN-T LibriSpeech recipe (#2981) · c6a52355
      hwangjeff authored
      Summary:
      In the Conformer RNN-T LibriSpeech recipe, there's no need to perform manual optimization. This PR modifies the recipe to use automatic optimization instead.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2981
      
      Reviewed By: mthrok
      
      Differential Revision: D42507228
      
      Pulled By: hwangjeff
      
      fbshipit-source-id: 9712add951eba356e39f7e8c8dc3bf584ba48309
      c6a52355
    • hwangjeff's avatar
      Make lengths optional for additive noise operators (#2977) · bb077284
      hwangjeff authored
      Summary:
      For greater flexibility, this PR makes argument `lengths` optional for `add_noise` and `AddNoise`.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2977
      
      Reviewed By: nateanl
      
      Differential Revision: D42484211
      
      Pulled By: hwangjeff
      
      fbshipit-source-id: 54757dcc73df194bb98c1d9d42a2f43f3027b190
      bb077284
  17. 17 Jan, 2023 2 commits
    • Moto Hira's avatar
      Fix buffer flushing mechanism · 51731bf9
      Moto Hira authored
      Summary:
      When buffered data are cleared from ChunkedBuffer,
      the `num_buffered_frames` variable was not updated.
      
      This commit fixes that.
      
      Reviewed By: xiaohui-zhang
      
      Differential Revision: D42538519
      
      fbshipit-source-id: a24a9afcebebd8956d977f05e9c2f0b603d060d1
      51731bf9
    • Zhaoheng Ni's avatar
      Fix mel spectrogram visualization in TTS tutorial (#2989) · b983c665
      Zhaoheng Ni authored
      Summary:
      The mel spectrograms in the TTS tutorial are upside down. The PR fixes it by using `origin="lower"` in imshow.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2989
      
      Reviewed By: mthrok
      
      Differential Revision: D42538349
      
      Pulled By: nateanl
      
      fbshipit-source-id: 4388103a49bdfabf1705c1f979d44ecedd5c910a
      b983c665
  18. 16 Jan, 2023 1 commit
    • moto's avatar
      Refactor buffer common utils (#2988) · e259f156
      moto authored
      Summary:
      Split `convert_video` into memory allocation function and write function.
      
      Also put all the buffer implementations into detail namespace.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2988
      
      Reviewed By: xiaohui-zhang
      
      Differential Revision: D42536769
      
      Pulled By: mthrok
      
      fbshipit-source-id: 36fbf437d4bfd521322846161ae08a48c782c540
      e259f156