Skip to content

Commit 8c2c56b

Browse files
author
Schuler Henry Martin (BhP/HRL3.2-SH1)
committed
Added tests for LPC and LPCC.
1 parent 875c0ab commit 8c2c56b

File tree

3 files changed

+462
-5
lines changed

3 files changed

+462
-5
lines changed
131 Bytes
Binary file not shown.

playground/windowing/fileHandler.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ def __init__(self, filepath):
1010

1111
print(self.total_time)
1212

13+
def get_sampling_rate(self):
14+
return self.sampling_rate
15+
1316
def get_frame(self, frame_time, start_frame):
1417
frame_frames = int(self.sampling_rate * frame_time)
1518
return self.y[start_frame:(start_frame + frame_frames)], frame_frames
@@ -38,7 +41,7 @@ def autocorrelate(self, frame_size):
3841
plt.show()
3942
return librosa.autocorrelate(frame_y * np.hanning(frame_frames))
4043

41-
def get_lpc(self, frame_time):
44+
def get_lpc(self, frame_time, order):
4245
frame_y, frame_frames = self.get_frame(frame_time, 3200)
4346

44-
return librosa.lpc(frame_y * np.hanning(frame_frames), order=20)[1:]
47+
return librosa.lpc(frame_y * np.hanning(frame_frames), order=order)

0 commit comments

Comments
 (0)