29
29
from jinja2 import Environment , PackageLoader , select_autoescape ,FileSystemLoader
30
30
import os .path
31
31
import struct
32
- import scipy .signal as sig
32
+ import scipy .signal . windows as sw
33
33
34
34
def to_q31 (v ):
35
35
r = int (round (v * 2 ** 31 ))
@@ -173,9 +173,9 @@ def prepareWindowConfig(configs):
173
173
for config in configs :
174
174
c = configs [config ]
175
175
if c ["win" ] == "hamming" :
176
- win = sig .hamming (c ["fftlength" ], sym = False )
176
+ win = sw .hamming (c ["fftlength" ], sym = False )
177
177
if c ["win" ] == "hanning" :
178
- win = sig .hann (c ["fftlength" ], sym = False )
178
+ win = sw .hann (c ["fftlength" ], sym = False )
179
179
180
180
cvt = ConvertArray (c ["type" ])
181
181
c ["ctype" ]= ctype (c ["type" ])
@@ -252,4 +252,4 @@ def genMfccHeader(f,configs,filename):
252
252
print (htemplate .render (configs = configs ,filename = filename ),file = f )
253
253
254
254
def genMfccInit (f ,configs ,filename ):
255
- print (ctemplate .render (configs = configs ,filename = filename ),file = f )
255
+ print (ctemplate .render (configs = configs ,filename = filename ),file = f )
0 commit comments