In this section, we are going to actually use the TensorFlow.js API to run the FFT program. TensorFlow.js provides several derived implementations for FFT:
- tf.spectral.fft
- tf.spectral.ifft
- tf.spectral.rfft
- tf.spectral.irfft
TensorFlow.js also supports short-term Fourier transforms, which are a type of Fourier transformation that takes in a windowed sequence of the original samples:
- tf.singal.stft
By showing the output of these APIs with samples from cosine or sine waves, we will learn how this algorithm behaves.