1. 02 Jun, 2023 1 commit
    • moto's avatar
      [BC-Breaking] Remove compute_kaldi_pitch (#3368) · 5bbbb1d5
      moto authored
      Summary:
      This commit removes compute_kaldi_pitch function and the underlying Kaldi integration from torchaudio.
      
      Kaldi pitch function was added in a short period of time by integrating the original Kaldi implementation, instead of reimplementing it in PyTorch.
      
      The Kaldi integration employed a hack which replaces the base vector/matrix implementation of Kaldi with PyTorch Tensor so that there is only one blas library within torchaudio.
      
      Recently, we are making torchaudio more lean, and we don't see a wide adoption of kaldi_pitch feature, so we decided to remove them.
      
      See some of the discussion https://github.com/pytorch/audio/issues/1269
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/3368
      
      Differential Revision: D46406176
      
      Pulled By: mthrok
      
      fbshipit-source-id: ee5e24d825188f379979ddccd680c7323b119b1e
      5bbbb1d5
  2. 16 May, 2023 1 commit
  3. 09 May, 2023 1 commit
  4. 01 Feb, 2023 1 commit
  5. 09 Dec, 2022 1 commit
  6. 19 Jul, 2022 1 commit
    • moto's avatar
      Remove boost (#2552) · ee631d6b
      moto authored
      Summary:
      After reviewing the code for KenLM it turned out that we can build it without boost.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2552
      
      Reviewed By: xiaohui-zhang
      
      Differential Revision: D37949699
      
      Pulled By: mthrok
      
      fbshipit-source-id: 4a4ffae4220d0b764b53f52b93040670d91a84a3
      ee631d6b
  7. 24 Jun, 2022 1 commit
  8. 15 May, 2022 1 commit
    • John Reese's avatar
      [codemod][usort] apply import merging for fbcode (8 of 11) · d62875cc
      John Reese authored
      Summary:
      Applies new import merging and sorting from µsort v1.0.
      
      When merging imports, µsort will make a best-effort to move associated
      comments to match merged elements, but there are known limitations due to
      the diynamic nature of Python and developer tooling. These changes should
      not produce any dangerous runtime changes, but may require touch-ups to
      satisfy linters and other tooling.
      
      Note that µsort uses case-insensitive, lexicographical sorting, which
      results in a different ordering compared to isort. This provides a more
      consistent sorting order, matching the case-insensitive order used when
      sorting import statements by module name, and ensures that "frog", "FROG",
      and "Frog" always sort next to each other.
      
      For details on µsort's sorting and merging semantics, see the user guide:
      https://usort.readthedocs.io/en/stable/guide.html#sorting
      
      Reviewed By: lisroach
      
      Differential Revision: D36402214
      
      fbshipit-source-id: b641bfa9d46242188524d4ae2c44998922a62b4c
      d62875cc
  9. 17 Feb, 2022 1 commit
  10. 16 Feb, 2022 1 commit
    • moto's avatar
      Fix prototype exclusion in release (#2225) · a007e922
      moto authored
      Summary:
      This commit fixes the feature to exclude `torchaudio.prototype` module.
      
      In `setup.py` there is a special case that is triggered if the commit is on release branch or release tag, that  excludes `torchaudio.prototype`. This was introduced to make it easy for release-related work.
      It turned out that the submodules under `torchaudio.prototype`, such as `torchaudio.prototype.pipelines`, are not properly excluded from packaging.
      These sub modules did not exist in previous releases, so it was not an issue.
      
      **Note** This feature is triggered only in release branch, so the fix is not visible in the CI of this PR.
      https://app.circleci.com/pipelines/github/pytorch/audio/9674/workflows/d0c9a6f1-8ca9-441a-a5f5-08926075fa39/jobs/553985?invite=true#step-104-193
      
      The following outputs were observed when running it on local env.
      
      * Before the change
      
      ```
      $ BUILD_FFMPEG=0 BUILD_SOX=0 BUILD_CTC_DECODER=0 BUILD_RNNT=0 BUILD_KALDI=0 python setup.py clean bdist_wheel
      ```
      ```
      -- Git branch: prototype-exclusion
      -- Git SHA: 0af1edaa420c46be10292cbea7150c34ef80a0e1
      -- Git tag: None
      -- PyTorch dependency: torch
      -- Building version 0.11.0+0af1eda
       --- Initializing submodules
       --- Initialized submodule
      Excluding torchaudio.prototype from the package.
      ...
      creating build/lib.macosx-11.0-arm64-3.9/torchaudio/prototype
      creating build/lib.macosx-11.0-arm64-3.9/torchaudio/prototype/io
      copying torchaudio/prototype/io/streamer.py -> build/lib.macosx-11.0-arm64-3.9/torchaudio/prototype/io
      copying torchaudio/prototype/io/__init__.py -> build/lib.macosx-11.0-arm64-3.9/torchaudio/prototype/io
      creating build/lib.macosx-11.0-arm64-3.9/torchaudio/prototype/pipelines
      copying torchaudio/prototype/pipelines/__init__.py -> build/lib.macosx-11.0-arm64-3.9/torchaudio/prototype/pipelines
      copying torchaudio/prototype/pipelines/rnnt_pipeline.py -> build/lib.macosx-11.0-arm64-3.9/torchaudio/prototype/pipelines
      creating build/lib.macosx-11.0-arm64-3.9/torchaudio/prototype/ctc_decoder
      copying torchaudio/prototype/ctc_decoder/ctc_decoder.py -> build/lib.macosx-11.0-arm64-3.9/torchaudio/prototype/ctc_decoder
      copying torchaudio/prototype/ctc_decoder/__init__.py -> build/lib.macosx-11.0-arm64-3.9/torchaudio/prototype/ctc_decoder
      warning: build_py: byte-compiling is disabled, skipping.
      ```
      
      * After the change
      
      ```
      $ BUILD_FFMPEG=0 BUILD_SOX=0 BUILD_CTC_DECODER=0 BUILD_RNNT=0 BUILD_KALDI=0 python setup.py clean bdist_wheel
      ```
      
      ```
      -- Git branch: prototype-exclusion
      -- Git SHA: 0af1edaa420c46be10292cbea7150c34ef80a0e1
      -- Git tag: None
      -- PyTorch dependency: torch
      -- Building version 0.11.0+0af1eda
       --- Initializing submodules
       --- Initialized submodule
      Excluding torchaudio.prototype from the package.
      ...
      creating build/lib.macosx-11.0-arm64-3.9/torchaudio/models/wav2vec2
      copying torchaudio/models/wav2vec2/__init__.py -> build/lib.macosx-11.0-arm64-3.9/torchaudio/models/wav2vec2
      copying torchaudio/models/wav2vec2/model.py -> build/lib.macosx-11.0-arm64-3.9/torchaudio/models/wav2vec2
      copying torchaudio/models/wav2vec2/components.py -> build/lib.macosx-11.0-arm64-3.9/torchaudio/models/wav2vec2
      creating build/lib.macosx-11.0-arm64-3.9/torchaudio/models/wav2vec2/utils
      copying torchaudio/models/wav2vec2/utils/__init__.py -> build/lib.macosx-11.0-arm64-3.9/torchaudio/models/wav2vec2/utils
      copying torchaudio/models/wav2vec2/utils/import_huggingface.py -> build/lib.macosx-11.0-arm64-3.9/torchaudio/models/wav2vec2/utils
      copying torchaudio/models/wav2vec2/utils/import_fairseq.py -> build/lib.macosx-11.0-arm64-3.9/torchaudio/models/wav2vec2/utils
      warning: build_py: byte-compiling is disabled, skipping.
      ```
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2225
      
      Reviewed By: nateanl
      
      Differential Revision: D34257128
      
      Pulled By: mthrok
      
      fbshipit-source-id: a3d6eca5803356e5aa3fe0eda82f6a9f5affb8e8
      a007e922
  11. 06 Jan, 2022 2 commits
  12. 04 Jan, 2022 1 commit
  13. 23 Dec, 2021 1 commit
  14. 20 Dec, 2021 1 commit
    • moto's avatar
      Standardize the location of third-party source code (#2086) · 2476dd2d
      moto authored
      Summary:
      Previously sox-related third-party source code was archived at
      `third_party/sox/archives`.
      Recently KenLM-related third-party source code was added and
      they are archived at `third_party/archives`.
      
      This PR changes the sox archive location to `third_party/archives`,
      so that all the archvies are cached at the same location.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2086
      
      Reviewed By: carolineechen
      
      Differential Revision: D33236927
      
      Pulled By: mthrok
      
      fbshipit-source-id: 2f2aa5f4b386fefb46d7c98f7179c04995219f3c
      2476dd2d
  15. 17 Dec, 2021 1 commit
    • moto's avatar
      Add static build of KenLM (#2076) · adc559a8
      moto authored
      Summary:
      Add KenLM and its dependencies required for static build (`zlib`, `bzip2`, `lzma` and `boost-thread`).
      
      The KenLM and its dependencies are build but since no corresponding code on torchaudio side is changed, the resulting torchaudio extension module is not changed. (therefore, as long as build process passes on CI this PR should be good to go.)
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2076
      
      Reviewed By: carolineechen
      
      Differential Revision: D33189980
      
      Pulled By: mthrok
      
      fbshipit-source-id: 6096113128b939f3cf70990c99aacc4aaa954584
      adc559a8
  16. 03 Nov, 2021 1 commit
  17. 19 Oct, 2021 1 commit
  18. 18 Oct, 2021 1 commit
  19. 06 Oct, 2021 1 commit
  20. 27 Sep, 2021 1 commit
  21. 02 Jun, 2021 1 commit
  22. 04 Mar, 2021 1 commit
  23. 19 Feb, 2021 1 commit
  24. 04 Feb, 2021 1 commit
  25. 20 Jan, 2021 1 commit
  26. 09 Jan, 2021 1 commit
  27. 04 Jan, 2021 1 commit
  28. 26 Oct, 2020 1 commit
  29. 04 Aug, 2020 1 commit
    • moto's avatar
      Set zip_safe = False to disable egg installation (#842) · 3b055890
      moto authored
      Currently `setuptools` assumes that torhcaudio is zip safe and performs
      egg (zip) installation when `python setup.py install` (or `pip install .`).
      
      When `torchaudio` loads extension module written with Torchscript, 
      the corresponding loading function requires the `so` file to be present as 
      an actual file, and this does not work well with egg installation.
      
      This CC fixes this by setting `zip_safe=False` in setup.py and disable egg
      installation, so that `python setup.py install` installs uncompressed files
      with regular directory structure.
      3b055890
  30. 31 Jul, 2020 1 commit
    • moto's avatar
      Fix import order to supress the setuptools warning; (#846) · 7f99271d
      moto authored
      setuptools warns that it should be imported before Distutils
      
      ```
      site-packages/setuptools/distutils_patch.py:25: UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first.
      ```
      7f99271d
  31. 24 Jun, 2020 1 commit
  32. 27 May, 2020 1 commit
    • moto's avatar
      Self-contain codecs library (#625) · d3c83eaa
      moto authored
      * Clean up extension build mechanism and extension location
      
      * Add back the switch to depend on external sox
      
      * Remove print
      
      * Fix
      d3c83eaa
  33. 15 May, 2020 1 commit
    • moto's avatar
      [BC Breaking] Reorganize C++ resources (#630) · 44af0dea
      moto authored
      This PR
       - Changes the location of C++ codes from
           - from `torchaudio/torch_sox.cpp` to `torchaudio/csrc/sox.cpp`
           - from `torchaudio/torch_sox.h` to `torchaudio/csrc/sox.h`
       - Changes the location where the resulting library is placed
           - from `_torch_sox.so` (outside of `torchaudio` module)
              to `torchaudio/_torchaudio.so`.
      44af0dea
  34. 13 May, 2020 1 commit
  35. 16 Apr, 2020 1 commit
  36. 16 Jan, 2020 1 commit
  37. 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
  38. 07 Aug, 2019 1 commit
    • Edward Z. Yang's avatar
      Rewrite our packaging from scratch (#217) · cd185d1f
      Edward Z. Yang authored
      * New entry points are packaging/build_wheel.sh and packaging/build_conda.sh. The only mandatory environment variable you have to set is PYTHON_VERSION
      * CircleCI configuration uses 2.1-style parametrized builds to let you toggle python version, etc. as you do builds. We create a separate job per build configuration for maximum parallelism
      * build_tools/packaging got moved to packaging, to be in-line with directory structure in torchvision
      * The build_conda.sh and build_wheel.sh delegate most of the heavy lifting to pkg_helpers.bash, which defines a number of bash functions for performing common operations. The intent is that I'll copy-paste this file between other domain API projects.
      * TORCHAUDIO_ prefix removed from envvars, so that I can more easily share packaging scripts between projects
      * BUILD_VERSION is completely gone; just change the version number if you need to rebuild
      * No more logic for cloning and checking out a fresh copy of torchaudio
      cd185d1f
  39. 02 Aug, 2019 1 commit
    • Edward Z. Yang's avatar
      Conda nightly packaging updates. (#203) · a9bee3ed
      Edward Z. Yang authored
      Billing of changes:
      
      * Can now toggle what branch is built using BRANCH envvar
      * PyTorch nightly we were built against is hardcoded into conda meta.yaml
      * Disable Conda Python 3.5 builds as we don't have nightlies for torch at the moment
      * No more torchaudio-cpu or torchaudio-nightly suffix
      * Remove librosa from testing stanza, so that conda build works with stock anaconda channel
      * Change convention on PREFIX to be what we previously called $PREFIX/audio
      * Make build_from_source.sh cd-neutral
      
      Signed-off-by: Edward Z. Yang ezyang@fb.com
      a9bee3ed