-
Notifications
You must be signed in to change notification settings - Fork 2k
Support stft and inverse stft ops. #1362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I tried to implement this and found we first need to implement window functions like hann or hamming. I'll work on them first. https://www.tensorflow.org/versions/r2.0/api_docs/python/tf/signal/hann_window |
@Lewuathe can we work together in this module and add support to more ops as mentioned in tf.signals similar PR tensorflow/tensorflow#27075 |
Thanks! I think you can add necessary ops in tf.signal. Some other ops like fft are still in |
thanks! 😃
reference np.fft |
@Gurpreetsingh9465 since those don't exist in TensorFlow we probably won't implement them in TensorFlow.js for now. |
Great! Just curious if you have a concrete use case for those ops? |
I am not sure about that but i think discrete cosine transform converts one function into sum of cosine functions of different amplitude which can be used to compress mp3 or image files. |
For now let's try to keep it to the ops we have a concrete use case (one that someone wants to build), otherwise we bloat the bundle size without a real need for the op :) |
Ok @nsthorat 😃 |
FEATURE Add [Hann window op](https://www.tensorflow.org/versions/r2.0/api_docs/python/tf/signal/hann_window) and [hamming window op](https://www.tensorflow.org/api_docs/python/tf/signal/hamming_window) since this window function is necessary to implement stft and isftf as well as hamming window. See: tensorflow/tfjs#1362
FEATURE Add frame op as provided in [TensorFlow core](https://www.tensorflow.org/api_docs/python/tf/signal/frame). It's also needed to implement stft, istft ops to make slices of the sample. See: tensorflow/tfjs#1362
FEATURE Add tf.signal.stft op. One TODO is passing fft length parameter because rfft does not support fft length parameter. We can pass fft length parameter after rfft supports it. See: tensorflow/tfjs#1362
Hey, any updates on the inverse STFT? Is anyone working on it? I am working on a project that needs it, and I would be willing to help implement it if necessary! |
@ClaraJacintho no one is working on it at this point , feel free to submit a PR. Thank you |
Hi, @ClaraJacintho Apologize for the delayed response and I see we have implemented tf.signal.stft and it seems like we haven't implemented |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you. |
Closing as stale. Please @mention us if this needs more attention. |
Bump. People are still looking for an official implementation of |
Would be nice, I've tried to do it myself but it doesnt quite work :) |
See:
https://www.tensorflow.org/api_docs/python/tf/signal/stft
https://www.tensorflow.org/api_docs/python/tf/signal/inverse_stft
The text was updated successfully, but these errors were encountered: