import os import numpy as np import struct import datetime import time import math class SpectrogramFile: def __init__(self, filePath): timeStart = time.perf_counter() print(f"Spectrogram from file: {os.path.basename(filePath)}") self.filePath = os.path.abspath(filePath) with open(filePath, 'rb') as f: filebytes = f.read() # validate file format magicNumber = struct.unpack("