1. 24 Mar, 2022 2 commits
  2. 22 Mar, 2022 3 commits
    • moto's avatar
      Revise the parameterization of third party libraries (#2282) · 7444f568
      moto authored
      Summary:
      Originally, the global property TORCHAUDIO_THIRD_PARTIES was introduced
      to handle the optional third party dependencies that can change based on
      the build config.
      
      After revising the CMake, it turned out this is not really necessary,
      as our torchaudio/csrc/CMakeLists.txt properly branches out for
      conditional dependencies. Rather we should leave the global scope untouched.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2282
      
      Reviewed By: hwangjeff
      
      Differential Revision: D35059838
      
      Pulled By: mthrok
      
      fbshipit-source-id: ed3557eaa9a669e4466d64893beab5089eca78b8
      7444f568
    • moto's avatar
      Add download utility specialized for torchaudio (#2283) · 64b98521
      moto authored
      Summary:
      In recent updates, torchaudio added features that download assets/models from
      download.pytorch.org/torchaudio.
      
      To reduce the code duplication, the implementations uses utilities from
      ``torch.hub``, but still, there are patterns repeated in implementing
      the fetch mechanism, notably cache and local file path handling.
      
      This commit introduces the utility function that handles
      download/cache/local path management that can be used for
      fetching pre-trained model data.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2283
      
      Reviewed By: carolineechen
      
      Differential Revision: D35050469
      
      Pulled By: mthrok
      
      fbshipit-source-id: 219dd806f9a96c54d2d31e981c1bbe282772702b
      64b98521
    • Hagen Wierstorf's avatar
      Fix calculation of SNR value in tutorial (#2285) · 8395fe65
      Hagen Wierstorf authored
      Summary:
      The calculation of the SNR in tha data augmentation examples seems to be wrong to me:
      
      ![image](https://user-images.githubusercontent.com/173624/159487032-c60470c6-ef8e-48a0-ad5e-a117fcb8d606.png)
      
      If we start from the definition of the signal-to-noise ratio using the root mean square value we get:
      
      ```
      SNR = 20 log10 ( rms(scale * speech) / rms(noise) )
      ```
      this can be transformed to
      ```
      scale = 10^(SNR/20) rms(noise) / rms(speech)
      ```
      In the example not `rms` is used but `lambda x: x.norm(p=2)`, but as we have the same length of the speech and noise signal, we have
      ```
      rms(noise) / rms(speech) = noise.norm(p=2) / speech.norm(p=2)
      ```
      this would lead us to:
      ```
      10^(SNR/20) = e^(SNR / 10)
      ```
      which is not true.
      
      Hence I changed `e^(SNR / 10)` to `10^(SNR/20)`.
      
      For the proposed SNR values of 20 dB, 10 dB, 3 dB the value of the scale would change from 7.39, 2.72, 1.35 to 10.0, 3.16, 1.41.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2285
      
      Reviewed By: nateanl
      
      Differential Revision: D35047737
      
      Pulled By: mthrok
      
      fbshipit-source-id: ac24c8fd48ef06b4b611e35163084644330a3ef3
      8395fe65
  3. 17 Mar, 2022 1 commit
  4. 10 Mar, 2022 3 commits
  5. 08 Mar, 2022 1 commit
  6. 06 Mar, 2022 1 commit
  7. 04 Mar, 2022 2 commits
    • moto's avatar
      Flush and reset internal state after seek (#2264) · 7e1afc40
      moto authored
      Summary:
      This commit adds the following behavior to `seek` so that `seek`
      works after a frame is decoded.
      
      1. Flush the decoder buffer.
      2. Recreate filter graphs (so that internal state is re-initialized)
      3. Discard the buffered tensor. (decoded chunks)
      
      Also it disallows negative values for seek timestamp.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2264
      
      Reviewed By: carolineechen
      
      Differential Revision: D34497826
      
      Pulled By: mthrok
      
      fbshipit-source-id: 8b9a5bf160dfeb15f5cced3eed2288c33e2eb35d
      7e1afc40
    • moto's avatar
      Make Streamer fail if an invalid option is provided (#2263) · 04875eef
      moto authored
      Summary:
      `torchaudio.prototype.io.Streamer` class takes context dependant options
      as `option` argument in the form of mappings of strings.
      
      Currently there is no check if the provided options were valid for
      the given input.
      
      This commit adds the check and raise an error if an invalid erro is given.
      
      This is analogous to `ffmpeg` command error handling.
      
      ```
      $ ffmpeg -foo
      ...
      Unrecognized option 'foo'.
      ```
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2263
      
      Reviewed By: hwangjeff
      
      Differential Revision: D34495111
      
      Pulled By: mthrok
      
      fbshipit-source-id: cd068de0dc1d1273bdd5d40312c3faccb47b253f
      04875eef
  8. 27 Feb, 2022 1 commit
  9. 26 Feb, 2022 3 commits
    • Moto Hira's avatar
      Enable ffmpeg prototyep unit test (#2261) · 955ffb47
      Moto Hira authored
      Summary:
      Pull Request resolved: https://github.com/pytorch/audio/pull/2261
      
      Enables prototype ffmpeg io tests in fbcode.
      
      Reviewed By: nateanl
      
      Differential Revision: D33698353
      
      fbshipit-source-id: 61de997c564135e677cd68e34fd7cc5dc0c5e036
      955ffb47
    • Zhaoheng Ni's avatar
      Add apply_beamforming to torchaudio.functional (#2232) · 9c56ffb4
      Zhaoheng Ni authored
      Summary:
      This PR adds ``apply_beamforming`` method to ``torchaudio.functional``.
      The method employs the beamforming weight to the multi-channel noisy spectrum to obtain the single-channel enhanced spectrum.
      The input arguments are the complex-valued beamforming weight Tensor and the multi-channel noisy spectrum.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2232
      
      Reviewed By: mthrok
      
      Differential Revision: D34474561
      
      Pulled By: nateanl
      
      fbshipit-source-id: 2910251a8f111e65375dfb50495b6a415113f06d
      9c56ffb4
    • moto's avatar
      Improve device streaming (#2202) · 365313ed
      moto authored
      Summary:
      This commit adds tutorial for device ASR, and update API for device streaming.
      
      The changes for the interface are
      1. Add `timeout` and `backoff` parameters to `process_packet` and `stream` methods.
      2. Move `fill_buffer` method to private.
      
      When dealing with device stream, there are situations where the device buffer is not
      ready and the system returns `EAGAIN`. In such case, the previous implementation of
      `process_packet` method raised an exception in Python layer , but for device ASR,
      this is inefficient. A better approach is to retry within C++ layer in blocking manner.
      The new `timeout` parameter serves this purpose.
      
      Pull Request resolved: https://github.com/pytorch/audio/pull/2202
      
      Reviewed By: nateanl
      
      Differential Revision: D34475829
      
      Pulled By: mthrok
      
      fbshipit-source-id: bb6d0b125d800f87d189db40815af06fbd4cab59
      365313ed
  10. 25 Feb, 2022 6 commits
  11. 24 Feb, 2022 4 commits
  12. 23 Feb, 2022 1 commit
  13. 18 Feb, 2022 2 commits
  14. 17 Feb, 2022 4 commits
  15. 16 Feb, 2022 6 commits