parameters: (signal, fft_length, hop_length=None, window_length=None)
return_statement: return np.abs(np.fft.rfft(windowed_frames, int(fft_length)))
docstring: Calculate the short-time Fourier transform magnitude.
  
    Args:
      signal: 1D np.array of the input time-domain signal.
      fft_length: Size of the FFT to apply.
      hop_length: Advance (in samples) between each frame passed to FFT.
      window_length: Length of each block of samples to pass to FFT.
  
    Returns:
      2D np.array where each row contains the magnitudes of the fft_length/2+1
      unique values of the FFT for the corresponding frame of input samples.
docstring_summary: Calculate the short-time Fourier transform magnitude.
docstring_tokens: Calculate the short - time Fourier transform magnitude .
function: def stft_magnitude(signal, fft_length, hop_length=None, window_length=None):
      """Calculate the short-time Fourier transform magnitude.
  
    Args:
      signal: 1D np.array of the input time-domain signal.
      fft_length: Size of the FFT to apply.
      hop_length: Advance (in samples) between each frame passed to FFT.
      window_length: Length of each block of samples to pass to FFT.
  
    Returns:
      2D np.array where each row contains the magnitudes of the fft_length/2+1
      unique values of the FFT for the corresponding frame of input samples.
    """
      frames = frame(signal, window_length, hop_length)
      # Apply frame window to each frame. We use a periodic Hann (cosine of period
      # window_length) instead of the symmetric Hann of np.hanning (period
      # window_length-1).
      window = periodic_hann(window_length)
      windowed_frames = frames * window
      return np.abs(np.fft.rfft(windowed_frames, int(fft_length)))
function_tokens: def stft_magnitude ( signal , fft_length , hop_length = None , window_length = None ) : frames = frame ( signal , window_length , hop_length ) # Apply frame window to each frame. We use a periodic Hann (cosine of period # window_length) instead of the symmetric Hann of np.hanning (period # window_length-1). window = periodic_hann ( window_length ) windowed_frames = frames * window return np . abs ( np . fft . rfft ( windowed_frames , int ( fft_length ) ) )