a simple python file that enables you to record live from your microphone, record to wav file and even plot live data from your microphone
- first Clone the repo
- you need to have pyaudio install
pip install pyaudio
pip install pipwin
pipwin install pyaudio
it provides you with prebuild pyaudio package
cd to Recwpy Folder and type:
python main.py
you first need to init the Record Class
from record import Mic
mic = Mic()
after initializing the class you can get direct data from your microphone
mic.output
mic.output is numpy array that contains the first chunk of information about the mic input
if you need just to record to wav file run
mic.record_toFile(output_file="outputfile.wav",
informitiveMode=True,
duration=3)
informitiveMode=True
is your friend if you want to get a glance of what happening behind the scene
Now the Cool part How to Plot Your Mic Output Live just as simple as Writing:
mic = Mic()
mic.plot()
mic = Mic()
mic.analysis.getfft()
mic.analysis
a class add new functionality to perform some audio analysis in the output you getting from your microphone
as of now, it's in development and just has one function which is getfft()