code: def magspec(frames, nfft):
      """Compute the magnitude spectrum of each frame in frames. If frames is an NxD matrix, output will be Nx(NFFT/2+1).
  
      :param frames: the array of frames. Each row is a frame.
      :param NFFT: the FFT length to use. If NFFT > frame_len, the frames are zero-padded.
      :returns: If frames is an NxD matrix, output will be Nx(NFFT/2+1). Each row will be the magnitude spectrum of the corresponding frame.
      """
      if numpy.shape(frames)[1] > nfft:
          logging.warning(
              "frame length (%d) is greater than FFT size (%d), frame will be truncated. Increase NFFT to avoid.",
              numpy.shape(frames)[1],
              nfft,
          )
      complex_spec = numpy.fft.rfft(frames, nfft)
      return numpy.absolute(complex_spec)
  
file_path: delta/delta/data/feat/python_speech_features/sigproc.py
imports: import decimal
  import math
  import logging
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: magspec(frames, nfft) and returns: numpy