Skip to content
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

FFT/STFT support #50

Open
happyTonakai opened this issue Jun 7, 2024 · 1 comment
Open

FFT/STFT support #50

happyTonakai opened this issue Jun 7, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@happyTonakai
Copy link

happyTonakai commented Jun 7, 2024

I found that 2D FFT and IFFT are implemented but 1D FFT and IFFT are not, as well as STFT and ISTFT, which are very important tool in audio signal area. It would be great if nobuco can support them. Thank you for the great work!

Unimplemented nodes:
 I  File "/home/user/miniconda3/envs/mss/lib/python3.10/site-packages/nobuco/trace/trace.py", line 460 
 D  File "/home/user/workspace/test/test.py", line 224  
MyModel[model](float32_0<1,2,32256>) -> float32_7<1,2,2,32256>
 │   I  File "/home/user/workspace/test/model.py", line 89 
 │  angle[torch](complex64_1<1,2,1025,64>) -> float32_2<1,2,1025,64>
 │   I  File "/home/user/workspace/test/model.py", line 283 
 │   D  File "/home/user/workspace/test/model.py", line 320  
 ├· ISTFT[model](complex64_3<1,2,2,1025,64>) -> float32_7<1,2,2,32256>
 │   │   I  File "/home/user/workspace/test/model.py", line 331 
 └   │  istft[torch](complex64_4<4,1025,64>, window=float32_5<2048>, n_fft=2048, hop_length=512, win_length=2048, center=True) -> float32_6<4,32256>

torch.stft and istft are equivalent to tf.signal.stft and tf.signal.inverse_stft

@happyTonakai happyTonakai changed the title FFT support FFT/STFT support Jun 7, 2024
@AlexanderLutsenko
Copy link
Owner

Hi! I added some experimental support for STFT/ISTFT (as well as 1D and 2D FFT/IFFT) in v0.14.7, which you can test here. It's not perfect, ISTFT breaks with windows containing zeros (e. g. Hann window). Let me know if you find a way around that.

@AlexanderLutsenko AlexanderLutsenko added the help wanted Extra attention is needed label Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants