1. 08 Nov, 2022 2 commits
    • Caroline Chen's avatar
      Enable log probs input for rnnt loss (#2798) · ca478823
      Caroline Chen authored
      Summary:
      Add `fused_log_softmax` argument (default/current behavior = True) to rnnt loss.
      
      If setting it to `False`, call `log_softmax` on the logits prior to passing it in to the rnnt loss function.
      
      The following should produce the same output:
      ```
      rnnt_loss(logits, targets, logit_lengths, target_lengths, fused_log_softmax=True)
      ```
      
      ```
      log_probs = torch.nn.functional.log_softmax(logits, dim=-1)
      rnnt_loss(log_probs, targets, logit_lengths, target_lengths, fused_log_softmax=False)
      ```
      
      testing -- unit tests + get same results on the conformer rnnt recipe
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2798
      
      Reviewed By: xiaohui-zhang
      
      Differential Revision: D41083523
      
      Pulled By: carolineechen
      
      fbshipit-source-id: e15442ceed1f461bbf06b724aa0561ff8827ad61
      ca478823
    • hwangjeff's avatar
      Add convolution transforms (#2811) · 2d99fee2
      hwangjeff authored
      Summary:
      Adds `torch.nn.Module`-based implementations for convolution and FFT convolution.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2811
      
      Reviewed By: carolineechen
      
      Differential Revision: D40881937
      
      Pulled By: hwangjeff
      
      fbshipit-source-id: bfe8969e6178ad4f58981efd4b2720ac006be8de
      2d99fee2
  2. 04 Nov, 2022 1 commit
  3. 31 Oct, 2022 1 commit
  4. 28 Oct, 2022 1 commit
  5. 26 Oct, 2022 1 commit
    • hwangjeff's avatar
      Deprecate 'onesided' init param for MelSpectrogram (#2797) · 546e699a
      hwangjeff authored
      Summary:
      Initializer parameter `onesided` isn't relevant to `MelSpectrogram` — it should always be `True`. In fact, the module already assumes `onesided == True` in the filterbank it generates and fails in its forward pass when `onesided == False`. Accordingly, this PR makes param `onesided` optional and adds a deprecation warning that's fired when the param is provided.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2797
      
      Reviewed By: carolineechen, xiaohui-zhang
      
      Differential Revision: D40731238
      
      Pulled By: hwangjeff
      
      fbshipit-source-id: 6eea8eb9d4a85a805162e03ad91682a1946f92cd
      546e699a
  6. 25 Oct, 2022 1 commit
    • moto's avatar
      Fix issue with the missing video frame in StreamWriter (#2789) · 17a2b93b
      moto authored
      Summary:
      Addresses https://github.com/pytorch/audio/issues/2790.
      
      Previously AVPacket objects had duration==0.
      
      `av_interleaved_write_frame` function was inferring the duration of packets by
      comparing them against the next ones but It could not infer the duration of
      the last packet, as there is no subsequent frame, thus was omitting it from the final data.
      
      This commit fixes it by explicitly setting packet duration = 1 (one frame)
      only for video. (audio AVPacket contains multiple samples, so it's different.
      To ensure the correctness for audio, the tests were added.)
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2789
      
      Reviewed By: xiaohui-zhang
      
      Differential Revision: D40627439
      
      Pulled By: mthrok
      
      fbshipit-source-id: 4d0d827bff518c017b115445e03bdf0bf1e68320
      17a2b93b
  7. 19 Oct, 2022 2 commits
  8. 12 Oct, 2022 1 commit
    • Caroline Chen's avatar
      Skip hubert xlarge torchscript test (#2758) · c2ea6898
      Caroline Chen authored
      Summary:
      a couple of circleci unittests are failing during hubert xlarge torchscript test, which has been known to fail on Windows in the past (#65776). this PR disables this test on circleci
      
      cc atalman
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2758
      
      Reviewed By: mthrok
      
      Differential Revision: D40290535
      
      Pulled By: carolineechen
      
      fbshipit-source-id: 5c5fb43434a517b6c439a8cb8e853015d1550a57
      c2ea6898
  9. 11 Oct, 2022 1 commit
  10. 10 Oct, 2022 1 commit
    • Zhaoheng Ni's avatar
      Add unit test for LibriMix dataset (#2659) · c5b8e585
      Zhaoheng Ni authored
      Summary:
      Besides the unit test, the PR also addresses these issues:
      - The original `LibriMix` dataset only supports "min" mode, which means the audio length is the minimum of all clean sources. It is default for source separation task. Users may also want to use "max" mode which allows for end-to-end separation and recognition. The PR adds ``mode`` argument to let users decide which dataset they want to use.
      - If the task is ``"enh_both"``, the target is the audios in ``mix_clean`` instead of separate clean sources. The PR fixes it to use ``mix_clean`` as target.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2659
      
      Reviewed By: carolineechen
      
      Differential Revision: D40229227
      
      Pulled By: nateanl
      
      fbshipit-source-id: fc07e0d88a245e1367656d3767cf98168a799235
      c5b8e585
  11. 09 Oct, 2022 1 commit
  12. 07 Oct, 2022 1 commit
  13. 21 Sep, 2022 1 commit
  14. 14 Sep, 2022 1 commit
  15. 13 Sep, 2022 1 commit
  16. 12 Sep, 2022 1 commit
  17. 01 Sep, 2022 1 commit
  18. 24 Aug, 2022 1 commit
    • moto's avatar
      Add StreamWriter (#2628) · 72404de9
      moto authored
      Summary:
      This commit adds FFmpeg-based encoder StreamWriter class.
      StreamWriter is pretty much the opposite of StreamReader class, and
      it supports;
      
      * Encoding audio / still image / video
      * Exporting to local file / streaming protocol / devices etc...
      * File-like object support (in later commit)
      * HW video encoding (in later commit)
      
      See also: https://fburl.com/gslide/z85kn5a9 (Meta internal)
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2628
      
      Reviewed By: nateanl
      
      Differential Revision: D38816650
      
      Pulled By: mthrok
      
      fbshipit-source-id: a9343b0d55755e186971dc96fb86eb52daa003c8
      72404de9
  19. 11 Aug, 2022 1 commit
  20. 09 Aug, 2022 1 commit
    • Caroline Chen's avatar
      Add NNLM support to CTC Decoder (#2528) · 03a0d68e
      Caroline Chen authored
      Summary:
      Expose flashlight's LM and LMState classes to support decoding with custom language models, including NN LMs.
      
      The `ctc_decoder` API is as follows
      - To decode with KenLM, pass in KenLM language model path to `lm` variable
      - To decode with custom LM, create Python class with `CTCDecoderLM` subclass, and pass in the class to `lm` variable. Additionally create a file of LM words listed in order of the LM index, with a word per line, and pass in the file to `lm_path`.
      - To decode without a language model, set `lm` to `None` (default)
      
      Validated against fairseq w2l decoder on sample LibriSpeech dataset and LM. Code for validation can be found [here](https://github.com/facebookresearch/fairseq/compare/main...carolineechen:fairseq:ctc-decoder). Also added unit tests to validate custom implementations of ZeroLM and KenLM, and also using a biased LM.
      
      Follow ups:
      - Train simple LM on LibriSpeech and demonstrate usage in tutorial or examples directory
      
      cc jacobkahn
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2528
      
      Reviewed By: mthrok
      
      Differential Revision: D38243802
      
      Pulled By: carolineechen
      
      fbshipit-source-id: 445e78f6c20bda655aabf819fc0f771fe68c73d7
      03a0d68e
  21. 05 Aug, 2022 1 commit
    • hwangjeff's avatar
      Add convolution operator (#2602) · b396157d
      hwangjeff authored
      Summary:
      Adds functions `convolve` and `fftconvolve`, which compute the convolution of two tensors along their trailing dimension. The former performs the convolution directly, whereas the latter performs it using FFT.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2602
      
      Reviewed By: nateanl, mthrok
      
      Differential Revision: D38450771
      
      Pulled By: hwangjeff
      
      fbshipit-source-id: b2d1e063ba21eafeddf317d60749e7120b14292b
      b396157d
  22. 03 Aug, 2022 2 commits
    • Sean Kim's avatar
      Add HDEMUCS_HIGH_MUSDB (#2601) · 6ecc11c2
      Sean Kim authored
      Summary:
      Add new model pretrained weights and tests
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2601
      
      Reviewed By: carolineechen, nateanl
      
      Differential Revision: D38396673
      
      Pulled By: skim0514
      
      fbshipit-source-id: e06f97d28508543bc18e671344386a947bc870c1
      6ecc11c2
    • bshall's avatar
      An implemenation of the ITU-R BS.1770-4 loudness recommendation (#2472) · 946b180a
      bshall authored
      Summary:
      I took a stab at implementing the ITU-R BS.1770-4 loudness recommendation (closes https://github.com/pytorch/audio/issues/1205). To give some more details:
      - I've implemented K-weighting following csteinmetz1 instead of BrechtDeMan since it fit well with torchaudio's already implemented filters (`treble_biquad` and `highpass_biquad`).
      - I've added four audio files to test compliance with the recommendation. These are linked in [this pdf](https://www.itu.int/dms_pub/itu-r/opb/rep/R-REP-BS.2217-2-2016-PDF-E.pdf). There are many more test files there but I didn't want to bog down the assets directory with too many files. Let me know if I should add or remove anything.
      - I've kept many of the constant internal to the function (e.g. the block duration, overlap, and the absolute threshold gamma). I'm not sure if these should be exposed in the signature.
      - I've implemented support for up to 5 channels (following both csteinmetz1 and BrechtDeMan). The recommendation includes weights for up to 24 channels. Is there any convention for how many channels to support?
      
      I hope this is helpful! looking forward to hearing from you.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2472
      
      Reviewed By: hwangjeff
      
      Differential Revision: D38389155
      
      Pulled By: carolineechen
      
      fbshipit-source-id: fcc86d864c04ab2bedaa9acd941ebc4478ca6904
      946b180a
  23. 28 Jul, 2022 2 commits
  24. 26 Jul, 2022 1 commit
  25. 25 Jul, 2022 1 commit
  26. 22 Jul, 2022 1 commit
    • Zhaoheng Ni's avatar
      Add documents for SourceSeparationBundle (#2559) · 6cee56ab
      Zhaoheng Ni authored
      Summary:
      - Add documentation page for `SourceSeparationBundle` and `CONVTASNET_BASE_LIBRI2MIX`.
      - Add citation of Libri2Mix dataset in the bundle documentation.
      - url in integration test should use slash instead of `os.path.join` as it will fail on Windows. Change it to f-string.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2559
      
      Reviewed By: carolineechen
      
      Differential Revision: D38036116
      
      Pulled By: nateanl
      
      fbshipit-source-id: 736732805191113955badfec3955e2e24e8f4836
      6cee56ab
  27. 21 Jul, 2022 1 commit
    • Zhaoheng Ni's avatar
      Add SourceSeparationBundle to prototype (#2440) · 83362580
      Zhaoheng Ni authored
      Summary:
      - Add SourceSeparationBundle class for source separation pipeline
      - Add `CONVTASNET_BASE_LIBRI2MIX` that is trained on Libri2Mix dataset.
      - Add integration test with example mixture audio and expected scale-invariant signal-to-distortion ratio (Si-SDR) score. The test computes the Si-SDR score with permutation-invariant training (PIT) criterion for all permutations of sources and use the highest value as the final output. The test verifies if the score is equal to or larger than the expected value.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2440
      
      Reviewed By: mthrok
      
      Differential Revision: D37997646
      
      Pulled By: nateanl
      
      fbshipit-source-id: c951bcbbe8b7ed9553cb8793d6dc1ef90d5a29fe
      83362580
  28. 19 Jul, 2022 1 commit
  29. 12 Jul, 2022 1 commit
  30. 07 Jul, 2022 1 commit
  31. 06 Jul, 2022 1 commit
    • Caroline Chen's avatar
      Fix fluent test for windows (#2510) · 09daa438
      Caroline Chen authored
      Summary:
      fluent dataset test currently fails on windows, due to new line generation in csv writer in testing and incorrect path parsing in dataset impl.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2510
      
      Reviewed By: carolineechen
      
      Differential Revision: D37573203
      
      Pulled By: mthrok
      
      fbshipit-source-id: 4868bc649690c7e596b002686c6128ce735d3564
      09daa438
  32. 28 Jun, 2022 1 commit
    • moto's avatar
      Refactor AVDictionary clean up (#2507) · 0ad03adf
      moto authored
      Summary:
      Small clean up in ffmpeg binding code.
      
      1. Make `get_option_dict` and `clean_up_dict` public utility
      2. Merge the exception into `clean_up_dict`
      3. Get rid of custom string join function and use `c10::Join`.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2507
      
      Reviewed By: hwangjeff
      
      Differential Revision: D37466022
      
      Pulled By: mthrok
      
      fbshipit-source-id: 44b769ac6ff1ab20e6d6ae086cd1447deacb5969
      0ad03adf
  33. 27 Jun, 2022 4 commits