mirror of
https://github.com/wassname/TTS.git
synced 2026-09-09 11:16:00 +08:00
Change name of the functions
This commit is contained in:
+4
-4
@@ -245,11 +245,11 @@ class AudioProcessor(object):
|
||||
### DB and AMP conversion ###
|
||||
# pylint: disable=no-self-use
|
||||
def _amp_to_db(self, x):
|
||||
return self.spec_gain * log_(np.maximum(1e-5, x), self.base)
|
||||
return self.spec_gain * _log(np.maximum(1e-5, x), self.base)
|
||||
|
||||
# pylint: disable=no-self-use
|
||||
def _db_to_amp(self, x):
|
||||
return exp_(x / self.spec_gain, self.base)
|
||||
return _exp(x / self.spec_gain, self.base)
|
||||
|
||||
### Preemphasis ###
|
||||
def apply_preemphasis(self, x):
|
||||
@@ -429,12 +429,12 @@ class AudioProcessor(object):
|
||||
def dequantize(x, bits):
|
||||
return 2 * x / (2 ** bits - 1) - 1
|
||||
|
||||
def log_(x, base):
|
||||
def _log(x, base):
|
||||
if base == 10:
|
||||
return np.log10(x)
|
||||
return np.log(x)
|
||||
|
||||
def exp_(x, base):
|
||||
def _exp(x, base):
|
||||
if base == 10:
|
||||
return np.power(10, x)
|
||||
return np.exp(x)
|
||||
|
||||
Reference in New Issue
Block a user