File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,9 @@ def __init__(self, filePath):
45
45
self .decibels = int (filebytes [72 ]) == 1
46
46
47
47
# new variables
48
- self .melBinCount = int ( filebytes [84 ])
49
- self .imageHeight = int ( filebytes [88 ])
50
- self .imageWidth = int ( filebytes [92 ])
48
+ self .melBinCount = struct . unpack ( "<l" , filebytes [84 : 88 ])[ 0 ]
49
+ self .imageHeight = struct . unpack ( "<l" , filebytes [88 : 92 ])[ 0 ]
50
+ self .imageWidth = struct . unpack ( "<l" , filebytes [92 : 96 ])[ 0 ]
51
51
52
52
# useful class properties
53
53
self .secPerPx = self .stepSize / self .sampleRate
@@ -122,4 +122,6 @@ def getDescription(self):
122
122
f"({ self .valuesPerPoint * self .imageWidth * self .imageHeight :,} values) " + \
123
123
f"in { self .loadTimeMsec :.02f} ms"
124
124
d += "\n "
125
+ d += f"\n numpy array shape: { self .values .shape } "
126
+ d += "\n "
125
127
return d
You can’t perform that action at this time.
0 commit comments