Skip to content

Instantly share code, notes, and snippets.

View davecampbell's full-sized avatar

dave campbell davecampbell

View GitHub Profile
@davecampbell
davecampbell / waveform.py
Last active May 30, 2019 17:04
visualize audio signal from microphone
import sys
import pyaudio
import struct
import numpy as np
import matplotlib.pyplot as plt
%matplotlib tk
CHUNK = 1024 * 4
FORMAT = pyaudio.paInt16