Skip to content

Conversation

@vincentqb
Copy link
Contributor

Merge up to db8f2bf from master, which is end of July 14th, see here.

seemethere and others added 27 commits June 24, 2020 12:50
* packaging: Add test channels to pytorch dependency resolution

Signed-off-by: Eli Uriegas <[email protected]>

* .circleci: Add test channel to smoke tests

Signed-off-by: Eli Uriegas <[email protected]>

* .circleci: Put pytorch-test into a higher priority

pytorch-nightly was getting prioritized over pytorch-nightly which
shouldn't be the case

Signed-off-by: Eli Uriegas <[email protected]>
This is a part of PRs to add new "sox_io" backend. pytorch#726 and depends on pytorch#718 and pytorch#728 .

This PR adds `load` function to "sox_io" backend, which is  tested on the following audio formats;
 - `wav`
 - `mp3`
 - `flac`
 - `ogg/vorbis` *

By default, "sox_io" backend returns Tensor with `float32` dtype and the shape of `[channel, time]`. The samples are normalized to fit in the range of `[-1.0, 1.0]`.

Unlike existing "sox" backend, the new `load` function can handle WAV file natively, when the input format is WAV with integer type, (such as 32-bit signed integer, 16-bit signed integer and 8-bit unsigned integer) by providing `normalize=False`, this function can return integer Tensor, where the samples are expressed within the whole range of the corresponding dtype, that is, `int32` tensor for `32-bit PCM`, `int16` for `16-bit PCM` and `uint8` for `8-bit PCM`. This behavior follows [scipy.io.wavfile.read](https://docs.scipy.org/doc/scipy/reference/generated/scipy.io.wavfile.read.html). `normalize` parameter has no effect for other formats and the load function always return normalized value with `float32` Tensor.

__* Note__ The current binary distribution of torchaudio does not contain `ogg/vorbis` and `opus` codecs. To handle these files, one needs to build torchaudio from the source with proper codecs in the system.

__Note 2__ Since this PR, `scipy` becomes required module for running test.
* Update functional.py

rollback torch.norm() in spectrogram() to v0.4.0.

* Update functional.py

comment out `spec_f = complex_norm(spec_f, power=power)`.

* fixed complex_norm() instead of spectrogram() for torch.norm() issue.

* lint

Co-authored-by: bongjin.lee <[email protected]>
Co-authored-by: Vincent QB <[email protected]>
* update varible names and docstring

* update format

* update docsting and output value

Co-authored-by: Ji Chen <[email protected]>
* Use cmake for third party

* Apply patch to libmad

* Update gitignore

* Update docker test image
This is a part of PRs to add new "sox_io" backend. pytorch#726 and depends on pytorch#718, pytorch#728 and pytorch#731.

This PR adds `save` function to "sox_io" backend, which can save Tensor to a file with the following audio formats;
 - `wav`
 - `mp3`
 - `flac`
 - `ogg/vorbis`
* upsamplenetwork

* update name

* update name and docstring

* update format

* rebase

* update docstring

* update docstring

* remove transpose and update docstring

Co-authored-by: Ji Chen <[email protected]>
* upsamplenetwork

* update variable names

* update variable name

* add wavernn model

* update test

* update format

* update format

* update format

* fix conflicts and add transpose

* import update

* update transpose

* update format

* update docstring

* add n_channel in input

* add comment

* update docstring

* update docstring

Co-authored-by: Ji Chen <[email protected]>
…#759)

* add Waveforms for Testing Purposes section

* Update test/README.md

use wrapper function for scipy.io.wavfile.read

Co-authored-by: moto <[email protected]>

* remove un-used files from the doc

* Update test/README.md

Rename variable

Co-authored-by: moto <[email protected]>

* fix indent; remove mentions of unused files

* remove whitenoise* files from README.md

Co-authored-by: moto <[email protected]>
…ytorch#772)

* converted CommonVoice tartar mp3 to wav using rate 8000 Hz

* Remove Unused dtmf_30s_stereo.mp3
In pytorch#779, we plan to remove `frames_per_chunk` parameter from `save` function, but it will take some time before we can land pytorch#779, so we go ahead and remove the parameter first to reduce the conflict caused by interface change.
Part of pytorch#764

 - Replace `whitenoise.wav` with on-the-fly data generation
 - Replace `torchaudio.load` with `common_utils.load_wav`
 - Replace `steam-train-whistle-daniel_simon.mp3` with `.wav`
`test/test_sox_effects.py::Test_SoxEffectsChain::test_lowpass_speed` has some issue on our macOS CI, even though there was no issue at pytorch#777 .

While we figure out the fix, we disable this test for macOS.
This PR replaces `torchaudio.sox_effects.SoxEffectsChain` in `test_sox_compatibility` with bare `sox` command.

The parity of `torchaudio.sox_effects.SoxEffectsChain` against `sox` command is not tested and it has known issues pytorch#771, therefore it is not appropriate to use this class for testing other functions.
@vincentqb vincentqb requested a review from seemethere July 17, 2020 21:31
@mthrok
Copy link
Contributor

mthrok commented Jul 17, 2020

It's probably too late but the following methods would have been simpler

  1. checking out release/0.6 branch
  2. revert all the commits unique to release/0.6 branch back to a downstream of master branch
  3. pull master branch up to the commit you like
  4. cherry-pick the commits uniquely added to release/0.6 (those by @ seemethere)
  5. resolve conflicts.

@codecov
Copy link

codecov bot commented Jul 17, 2020

Codecov Report

❗ No coverage uploaded for pull request base (release/0.6@56aa954). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff               @@
##             release/0.6     #799   +/-   ##
==============================================
  Coverage               ?   89.53%           
==============================================
  Files                  ?       32           
  Lines                  ?     2617           
  Branches               ?        0           
==============================================
  Hits                   ?     2343           
  Misses                 ?      274           
  Partials               ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 56aa954...a8d6ec7. Read the comment docs.

@seemethere seemethere merged commit f17ae39 into pytorch:release/0.6 Jul 20, 2020
mpc001 pushed a commit to mpc001/audio that referenced this pull request Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants