1. 10 Aug, 2023 1 commit
    • moto's avatar
      Move backend initialization to toplevel (#3548) · 6fb21ab1
      moto authored
      Summary:
      The backend dispatcher is implemented in `torchaudio._backend`, while the legacy backend is implemented in `torchaudio.backend`.
      
      The initialization happen in `torchaudio._backend`.
      This commit moves it to `torchaudio.__init__`, so that `backend` and `_backend` is more independent.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/3548
      
      Reviewed By: huangruizhe
      
      Differential Revision: D48219244
      
      Pulled By: mthrok
      
      fbshipit-source-id: e694cb232794f90902a60ee51c7bf11b7f0548a0
      6fb21ab1
  2. 10 May, 2023 1 commit
  3. 23 Dec, 2021 1 commit
  4. 05 Mar, 2021 1 commit
  5. 02 Mar, 2021 1 commit
  6. 24 Feb, 2021 1 commit
  7. 04 Feb, 2021 1 commit
  8. 27 Oct, 2020 1 commit
    • moto's avatar
      Switch the default backend to the ones with new interfaces (#978) · fa2e4fd4
      moto authored
      Refer to #903 for the overview of planned I/O changes.
      
      * Change the default backend from `"sox"(deprecated)` to `"sox_io"`
      * Change the default interface of `"soundfile"` backend to the one identical to `"sox_io"` backend.
      * Deprecate torchaudio.USE_SOUNDFILE_LEGACY_INTERFACE
      * Update documentations
          * Re-order backends (default first)
          * Update overhaul timeline (removed 0.7.0)
          * Simplify `"soundfile"` backend description
      fa2e4fd4
  9. 28 Sep, 2020 1 commit
    • moto's avatar
      Add "soundfile" backend compatible to "sox_io" (#922) · 2c723e8c
      moto authored
      As a part of the "sox" backend sunset plan (#903), we add a "soundfile" backend that is compatible with the "sox_io" backend. No new public backend name is added. We provide a switch to change the interface/behavior of "soundfile" backend.
      
      This commit contains;
       - The implementation of the new "soundfile" backend.
       - The flag to switch the behavior of "soundfile" backend. (`torchaudio.USE_SOUNDFILE_LEGACY_INTERFACE`)
       - Test for the new backend and switching mechanism.
      
      The default behavior of "soundfile" backend is not changed. The users who want to opt-in the new "soundfile" interface can do so by `torchaudio.USE_SOUNDFILE_LEGACY_INTERFACE = False` before changing the backend to "soundfile".
      
      In 0.8.0 release, the "soundfile" backend will use this interface by default, and users can still use the legacy one with `torchaudio.USE_SOUNDFILE_LEGACY_INTERFACE = True`. In 0.9.0, the legacy interface is removed and `torchaudio.USE_SOUNDFILE_LEGACY_INTERFACE` flag will be eventually removed.
      2c723e8c
  10. 05 Aug, 2020 1 commit
    • moto's avatar
      [CI] Run unit test with non-editable installation (#845) · 9ba02d5b
      moto authored
      We have been running unit test with editable installation. (i.e. `python setup.py develop`), with which we missed issues like #842. 
      
      This CC makes installation in CI non-editable, and change test directory structure so that the source code will not shadow the installed version of `torchaudio`. With simple `pytest test`, `pytest` modifies `sys.path` and prepend checked out repository, which shadows the installed version.
      
      To remedy this, the whole test suites has been moved from `./test` to `./test/torchaudio_unittest`. This adds nice module structure to our test code and we can do absolute import in each test module, which makes it possible again to run test with `python -m unittest torchaudio_unittest/XXX.py`
      
      This change does not affect the regular development process (`python setup.py develop` && `pytest test`)
      9ba02d5b
  11. 01 Jul, 2020 1 commit
  12. 19 Jun, 2020 1 commit
    • moto's avatar
      Add TorchScript-able "info" func to sox_io backend (#728) · 88fccd14
      moto authored
      This is a part of PRs to add new "sox_io" backend #726, and depends on #718.
      
      This PR adds `info` function to "sox_io" backend, which allows users to fetch some metadata of an audio file. 
      At this moment, the information retrieved are;
      
       - Number of samples in the audio file
       - Sampling rate
       - Number of channels
      88fccd14
  13. 18 Jun, 2020 1 commit
    • moto's avatar
      Make TestCases backend-aware (#719) · b17da7a4
      moto authored
      * Make tests backend aware by introducing TorchaudioTestCase and reset backend for each TestCase.
      
      * Set backends for the test cases that require specific backend.
      b17da7a4
  14. 16 Jun, 2020 1 commit
    • moto's avatar
      Refactor backend and not rely on global variables on switching (#698) · e9f19c35
      moto authored
      * Refactor backend switching
      
      1. Do not rely on global variables for backend switch
         So that load/save/info/load_wav functions will be torchscript-able
      2. Add no_backend module to for the case there is no backend module available
         [bonus] This allows the whole codebase importable on systems that do not have torchaudio C++ extension nor soundfile.
      e9f19c35