Skip to content
This repository has been archived by the owner on Jun 6, 2022. It is now read-only.
/ audio-stream Public archive

A python project that uses an audio stream from a microphone to analyze and plot the wave in time and frequency domain form

Notifications You must be signed in to change notification settings

luizcarloscf/audio-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Audio Stream

Audio is capture from the microphone and plotting the wave form in time and frequency domain.

Usage

Run on terminal:

git clone https://github.com/luizcarloscf/audio-stream.git
cd audio-stream
./bootstrap.sh
python3 src/main.py

For more informations about what can be configurated just run:

python3 src/main.py --help

About

Audio recorder

The audio is capture from the microphone using a python package PyAudio on a thread. PyAudio provides Python bindings for PortAudio, the cross-platform audio I/O library.

Fast Fourier Transform

The audio analysis to get the data on frequency domain is compute by the Fast Fourier Transform.

The discrete Fourier transform (DFT) is a mathematical technique used to convert temporal or spatial data into frequency domain data. The DFT, is defined as:

The FFT is a fast algorithm to compute the DFT. It's possible to divide the DFT computation into two smaller parts. From the definition of the DFT we have:

Based on the conclusion above, we design a algorithm to compute the FFT.

Graphic

Create a plotting figure using matplotlib.

Matplotlib is a Python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms

The plotting figure show the audio that is being captured and the spectrum.

Developing

Requirements

To install the dependencies on Ubuntu, just run:

./bootstrap.sh

About

A python project that uses an audio stream from a microphone to analyze and plot the wave in time and frequency domain form

Topics

Resources

Stars

Watchers

Forks