code: def is_valid(self, data):
          
  
          signal = AudioEnergyValidator._convert(data, self.sample_width)
          return AudioEnergyValidator._signal_log_energy(signal) >= self._energy_threshold
docs: Check if data is valid. Audio data will be converted into an array (of
          signed values) of which the log energy is computed. Log energy is computed
          as follows:
  
          .. code:: python
  
              arr = AudioEnergyValidator._convert(signal, sample_width)
              energy = float(numpy.dot(arr, arr)) / len(arr)
              log_energy = 10. * numpy.log10(energy)
  
  
          :Parameters:
  
          `data` : either a *string* or a *Bytes* buffer
              `data` is converted into a numerical array using the `sample_width`
              given in the constructor.
  
          :Returns:
  
          True if `log_energy` >= `energy_threshold`, False otherwise.