Improvement: LTPF now work on decoded ring buffer

This commit is contained in:
Antoine SOULIER
2022-04-20 14:52:49 +02:00
parent 6f2b25df8a
commit c3831b7b24
8 changed files with 142 additions and 96 deletions

View File

@@ -302,7 +302,7 @@ class LtpfSynthesis(Ltpf):
max_pitch_12k8 = 228
max_pitch = max_pitch_12k8 * T.SRATE_KHZ[self.sr] / 12.8
max_pitch = np.ceil(max_pitch).astype(np.int)
max_pitch = np.ceil(max_pitch).astype(int)
self.x = np.zeros(ns)
self.y = np.zeros(max_pitch + len(self.C_D[0]))
@@ -435,7 +435,7 @@ def initial_state():
def initial_sstate():
return { 'active': False, 'pitch': 0,
'c': np.zeros((12,2)), 'x': np.zeros(12) }
'c': np.zeros(2*12), 'x': np.zeros(12) }
### ------------------------------------------------------------------------ ###