Skip to content

Instantly share code, notes, and snippets.

View kepler62f's full-sized avatar

kepler62f

View GitHub Profile
@kepler62f
kepler62f / micrecorder.py
Created May 21, 2020 14:29
Record audio stream from a microphone to wav files (with overlaps) using pyaudio
from datetime import datetime
import pyaudio
import wave
class MicRecorder():
'''
A recorder class for recording audio stream from a microphone to WAV files.
Uses non-blocking callback threads to get audio stream but uses a list
to save chunks of stream to file