Skip to content

ISTFT - #130

Closed
jamarshon wants to merge 27 commits into
pytorch:masterfrom
jamarshon:istft
Closed

ISTFT#130
jamarshon wants to merge 27 commits into
pytorch:masterfrom
jamarshon:istft

Conversation

@jamarshon

Copy link
Copy Markdown
Contributor

Inverse STFT

@jamarshon jamarshon changed the title [WIP] ISTFT ISTFT Jul 3, 2019

@vincentqb vincentqb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! Do you have a reference besides [1] that presents the implementation done here?

Comment thread torchaudio/functional.py Resolved
Comment thread torchaudio/functional.py Resolved
Comment thread test/test_functional.py Resolved
@jamarshon

Copy link
Copy Markdown
Contributor Author

@vincentqb I think that [1] is sufficient to describe the overlap add method

@vincentqb

vincentqb commented Jul 5, 2019 •

Copy link
Copy Markdown
Contributor

@jamarshon Thanks for specifying the default values in the header of the function.

For acceptance, we need to validate correctness by documenting and testing enough to confirm the pull request is indeed correct. Evidences make the approval process faster.

For documentation, we need to provide references for the details of the implementation provided. For example, beside [Griffin and Lim], did you base your implementation on scipy's? The description of the pull request needs to offer enough context to understand the evidences provided: see for instance the new issue tab for pytorch. For instance, there are other issues or pull requests that are relevant, say #27 and #3775.

For testing,

  1. we need to show important properties are fulfilled: for example, the composition of ISTFT and STFT (and of STFT and ISTFT) is the identity under appropriate conditions,
  2. the algorithm is correct for a known analytical solution,
  3. the algorithm matches the result of an outside implementation.

If for example scipy's implementation was used as a reference, it could be mentioned here along with a notebook showing that the two results are the same, see for instance #21250.

(For reference, here are general acceptance criteria here.)

Comment thread test/test_functional.py Resolved
Comment thread test/test_functional.py Resolved
Comment thread test/test_functional.py Resolved
Comment thread test/test_functional.py Resolved
Comment thread torchaudio/functional.py Resolved
@jamarshon

jamarshon commented Jul 5, 2019 •

Copy link
Copy Markdown
Contributor Author

Comment thread test/test_functional.py Resolved
Comment thread test/test_functional.py Resolved
Comment thread test/test_functional.py Resolved
Comment thread torchaudio/functional.py Resolved
@vincentqb

Copy link
Copy Markdown
Contributor

Let's use sines as analytical solution. Could you try the following analytical solution? Take f(t) = sin(2*pi*n*t/L) where L is the window length and hop. The result should be a band at frequency 2*pi*n/L.

Comment thread test/test_functional.py Resolved
Comment thread test/test_functional.py Resolved
Comment thread build_tools/travis/install.sh Resolved
Comment thread build_tools/travis/install.sh Resolved
Comment thread test/test_functional.py Resolved
Comment thread test/test_functional.py Resolved
Comment thread test/test_functional.py Resolved
Comment thread test/test_functional.py Resolved
Comment thread test/test_functional.py Resolved
Comment thread test/test_functional.py Resolved
Comment thread test/test_functional.py Resolved
Comment thread test/test_transforms.py Resolved
Comment thread torchaudio/functional.py Resolved
Comment thread test/test_functional.py Resolved
Comment thread test/test_functional.py Resolved

@vincentqb vincentqb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the testing we have done, the PR looks good to me. Thanks for working on this!

Comment thread test/test_functional.py Resolved
Comment thread test/test_transforms.py Resolved
@jamarshon jamarshon closed this Jul 10, 2019
This was referenced Jul 10, 2019
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.

3 participants