code: def calculate_nfft(samplerate, winlen):
      """Calculates the FFT size as a power of two greater than or equal to
      the number of samples in a single window length.
  
      Having an FFT less than the window length loses precision by dropping
      many of the samples; a longer FFT than the window allows zero-padding
      of the FFT buffer which is neutral in terms of frequency domain conversion.
  
      :param samplerate: The sample rate of the signal we are working with, in Hz.
      :param winlen: The length of the analysis window in seconds.
      """
      window_length_samples = winlen * samplerate
      nfft = 1
      while nfft < window_length_samples:
          nfft *= 2
      return nfft
  
file_path: python_speech_features/python_speech_features/base.py
imports: from __future__ import division
  import numpy
  from python_speech_features import sigproc
  from scipy.fftpack import dct
label_desc: Use image node_id 1 for calling a global function with example usage: calculate_nfft(samplerate, winlen) and returns: nfft