1. 16 Feb, 2023 2 commits
    • moto's avatar
      Add deprecation warning to decoder (#3055) · 6b2086cf
      moto authored
      Summary:
      Flashlight Text decoder is now available on PyPI and KenLM support is being added at
      https://github.com/flashlight/text/pull/43
      
      Once this work is merged, we can rely on the official distribution of Flashlight Text package, so we are adding deprecation warning.
      
      Once the decoder is fully available, one can install it with
      
      ```
      pip install flashlight-text
      pip install git+https://github.com/kpu/kenlm.git
      ```
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/3055
      
      Reviewed By: hwangjeff, nateanl
      
      Differential Revision: D43239150
      
      Pulled By: mthrok
      
      fbshipit-source-id: 728cb208b8403100cd4ccd80c6295d454756b414
      6b2086cf
    • hwangjeff's avatar
      Introduce I/O backend dispatcher (#3015) · b799fcd6
      hwangjeff authored
      Summary:
      Adds I/O backend dispatcher that routes I/O requests to FFmpeg, SoX, or Soundfile backend, per library availability. It allows users to specify a backend mapped to a media library, i.e. one of `["ffmpeg", "sox", "soundfile"]`, to use via keyword argument, with FFmpeg being the default. Environment variable `TORCHAUDIO_USE_BACKEND_DISPATCHER` gates enablement of the dispatcher; specifically, if `TORCHAUDIO_USE_BACKEND_DISPATCHER` is explicitly set to `1`, importing TorchAudio makes it accessible via `torchaudio.info`, `torchaudio.load`, and `torchaudio.save`.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/3015
      
      Reviewed By: mthrok
      
      Differential Revision: D43258649
      
      Pulled By: hwangjeff
      
      fbshipit-source-id: 8f12e4e56b9fa3f0814dd3fed3e1783ab23a53a1
      b799fcd6
  2. 15 Feb, 2023 5 commits
  3. 14 Feb, 2023 4 commits
  4. 11 Feb, 2023 1 commit
  5. 10 Feb, 2023 1 commit
  6. 09 Feb, 2023 3 commits
  7. 08 Feb, 2023 4 commits
    • moto's avatar
      Update the guard mechanism for FFmpeg-related features (#3028) · 98b3ac17
      moto authored
      Summary:
      Instead of raising an error when lazy import happens, this method allows to import features, and raises an error when the feature is being used.
      
      This makes it easy to adopt the same error mechanism across different modules. It is how it's done for sox-related features.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/3028
      
      Reviewed By: xiaohui-zhang
      
      Differential Revision: D42966976
      
      Pulled By: mthrok
      
      fbshipit-source-id: 423dfe0b8a3970cd07f20e841c794c7f2809f993
      98b3ac17
    • 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
  8. 07 Feb, 2023 2 commits
  9. 06 Feb, 2023 1 commit
  10. 04 Feb, 2023 2 commits
  11. 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
  12. 02 Feb, 2023 2 commits
  13. 01 Feb, 2023 5 commits
  14. 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
  15. 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
  16. 27 Jan, 2023 3 commits
  17. 26 Jan, 2023 1 commit
    • Moto Hira's avatar
      Abstract away AVFormatContext from StreamReader/Writer constructor (#3007) · 7ea69e61
      Moto Hira authored
      Summary:
      Pull Request resolved: https://github.com/pytorch/audio/pull/3007
      
      Simplify the construction of StreamReader/Writer in C++.
      
      Currently these classes require client code to build AVFormatContext
      manually. This is tedious and not user freindly.
      
      Some client code actually uses the same helper function that
      TorchAudio codebase uses.
      
      This commit moves the helper logic inside of the constructor of
      StreamReader/Writer, so that the signatures of these constructors
      are easy to use and similar to Python interface.
      
      Reviewed By: xiaohui-zhang
      
      Differential Revision: D42662520
      
      fbshipit-source-id: d95e5236810c48d7d9bd2d89c05d4f60a44b3ba1
      7ea69e61