def is_valid(self, data):
signal = AudioEnergyValidator._convert(data, self.sample_width)<EOL>return AudioEnergyValidator._signal_log_energy(signal) >= self._energy_threshold<EOL>
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.