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):
4545 self .decibels = int (filebytes [72 ]) == 1
4646
4747 # 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 ]
5151
5252 # useful class properties
5353 self .secPerPx = self .stepSize / self .sampleRate
@@ -122,4 +122,6 @@ def getDescription(self):
122122 f"({ self .valuesPerPoint * self .imageWidth * self .imageHeight :,} values) " + \
123123 f"in { self .loadTimeMsec :.02f} ms"
124124 d += "\n "
125+ d += f"\n numpy array shape: { self .values .shape } "
126+ d += "\n "
125127 return d
You can’t perform that action at this time.
0 commit comments