mirror of
https://github.com/google/liblc3.git
synced 2026-05-02 19:38:01 +00:00
test: Various fixes on python simulation code
This commit is contained in:
@@ -68,7 +68,7 @@ class Tns:
|
||||
self.dt = dt
|
||||
|
||||
(self.nfilters, self.lpc_weighting, self.rc_order, self.rc) = \
|
||||
(None, None, None, None)
|
||||
(None, None, [ None, None ], [ None, None ])
|
||||
|
||||
def get_data(self):
|
||||
|
||||
@@ -133,7 +133,7 @@ class TnsAnalysis(Tns):
|
||||
|
||||
return (r[0] / err, a)
|
||||
|
||||
def lpc_weighting(self, pred_gain, a):
|
||||
def lpc_weight(self, pred_gain, a):
|
||||
|
||||
gamma = 1 - (1 - 0.85) * (2 - pred_gain) / (2 - 1.5)
|
||||
return a * np.power(gamma, np.arange(len(a)))
|
||||
@@ -199,7 +199,7 @@ class TnsAnalysis(Tns):
|
||||
continue
|
||||
|
||||
if self.lpc_weighting and pred_gain < 2:
|
||||
a = self.lpc_weighting(pred_gain, a)
|
||||
a = self.lpc_weight(pred_gain, a)
|
||||
|
||||
rc = self.coeffs_reflexion(a)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user