<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 STFT Analysis/Synthesis - MusicBricks Tutorial
Introduction
This tutorial will guide you through some tools for performing spectral analysis and synthesis using the Essentia library (http
Step1:  After importing Essentia library, let's import other numerical and plotting tools
Step2:  Define the parameters of the STFT workflow
Step3:  Specify input and output audio filenames
Step4:  Define algorithm chain for frame-by-frame process
Step5:  Now we set the algorithm network and store the processed audio samples in the output file
Step6:  Finally we run the process that will store an output file in a WAV file
<ASSISTANT_TASK:>
Python Code:
# import essentia in streaming mode
import essentia
import essentia.streaming as es
Explanation: STFT Analysis/Synthesis - MusicBricks Tutorial
Introduction
This tutorial will guide you through some tools for performing spectral analysis and synthesis using the Essentia library (http://www.essentia.upf.edu). STFT stands for Short-Time Fourier Transform and it processes an input audio signal as a sequence of spectral frames. Spectral frames are complex-valued arrays contain the frequency representation of the windowed input signal.
This algorithm shows how to analyze the input signal, and resynthesize it again, allowing to apply new transformations directly on the spectral domain.
You should first install the Essentia library with Python bindings. Installation instructions are detailed here: http://essentia.upf.edu/documentation/installing.html . 
Processing steps
End of explanation
# import matplotlib for plotting
import matplotlib.pyplot as plt
import numpy as np
Explanation: After importing Essentia library, let's import other numerical and plotting tools
End of explanation
# algorithm parameters
framesize = 1024
hopsize = 256
Explanation: Define the parameters of the STFT workflow
End of explanation
inputFilename = 'singing-female.wav'
outputFilename = 'singing-female-stft.wav'
# create an audio loader and import audio file
out = np.array(0)
loader = es.MonoLoader(filename = inputFilename, sampleRate = 44100)
pool = essentia.Pool()
Explanation: Specify input and output audio filenames
End of explanation
# algorithm instantation
fcut = es.FrameCutter(frameSize = framesize, hopSize = hopsize, startFromZero =  False);
w = es.Windowing(type = "hann");
fft = es.FFT(size = framesize);
ifft = es.IFFT(size = framesize);
overl = es.OverlapAdd (frameSize = framesize, hopSize = hopsize, gain = 1./framesize );
awrite = es.MonoWriter (filename = outputFilename, sampleRate = 44100);
Explanation: Define algorithm chain for frame-by-frame process: 
FrameCutter -> Windowing -> FFT -> IFFT -> OverlapAdd -> AudioWriter
End of explanation
loader.audio >> fcut.signal
fcut.frame >> w.frame
w.frame >> fft.frame
fft.fft >> ifft.fft
ifft.frame >> overl.frame
overl.signal >> awrite.audio
overl.signal >> (pool, 'audio')
Explanation: Now we set the algorithm network and store the processed audio samples in the output file
End of explanation
essentia.run(loader)
Explanation: Finally we run the process that will store an output file in a WAV file
End of explanation
<END_TASK>