Reads stream from sound card and plots a waveform with matplotlib.
git clone https://github.com/pacyu/visualize.git
cd visualize
pip install -r requirements.txt
sudo apt-get install python3-tk
py run.py -h
output:
usage: Audio visualization [-h] [-e EFFECT] [-f FILENAME] [-r PLAYBACK_RATE]
[-p PAUSE]
optional arguments:
-h, --help show this help message and exit
-e EFFECT, --effect EFFECT
visualization effect: 1d or 2d or 3d
-f FILENAME, --filename FILENAME
play audio file
-r PLAYBACK_RATE, --playback-rate PLAYBACK_RATE
Specify the playback rate.(e.g. 1.2)
-p PAUSE, --pause PAUSE
Specify the delay time to play the animation.(unit
second)
e.g.
py run.py -e 1d
or
py run.py -e 2d
or
py run.py -e 3d
or
py run.py -e 1d -f "/path/xxx.mp3" -r 1.2
or
py run.py -e 2d -f "/path/xxx.mp3" -r 1.2
or
py run.py -e 3d -f "/path/xxx.mp3" -r 1.2
Parameters Description:
- Select visualization style.
- Audio file path.(output device mode only)
- Playback rate.(output device mode only)
- Delay time to play the animation.