def main(): # start recording -> 5 sec default recorder = Recorder() frames = recorder.start(5) recorder.write_wav(frames, "input.wav") # load the hum and process hum = track_pitch("input.wav") timeseries(hum) process(hum) """
def store(wavefile, alias): print("extracting pitches...") data = load() data[alias] = {} if data[alias]: return d = {} d['wavefile'] = wavefile d['pitches'] = track_pitch(wavefile) data[alias] = d datastr = json.dumps(data, indent=4) open("storage.json", "w").write(datastr)