项目作者: pacyu

项目描述 :
Get stream from sound card and draw waveform with matplotlib on python.
高级语言: Python
项目地址: git://github.com/pacyu/visualize.git
创建时间: 2019-11-28T15:31:29Z
项目社区:https://github.com/pacyu/visualize

开源协议:MIT License

下载


visualize

Reads stream from sound card and plots a waveform with matplotlib.

Installation

git clone https://github.com/pacyu/visualize.git \
cd visualize \
pip install -r requirements.txt \
sudo apt-get install python3-tk

Usage

  1. py run.py -h

output:

  1. usage: Audio visualization [-h] [-e EFFECT] [-f FILENAME] [-r PLAYBACK_RATE]
  2. [-p PAUSE]
  3. optional arguments:
  4. -h, --help show this help message and exit
  5. -e EFFECT, --effect EFFECT
  6. visualization effect: 1d or 2d or 3d
  7. -f FILENAME, --filename FILENAME
  8. play audio file
  9. -r PLAYBACK_RATE, --playback-rate PLAYBACK_RATE
  10. Specify the playback rate.(e.g. 1.2)
  11. -p PAUSE, --pause PAUSE
  12. Specify the delay time to play the animation.(unit
  13. second)

e.g.

  1. py run.py -e 1d

or

  1. py run.py -e 2d

or

  1. py run.py -e 3d

or

  1. py run.py -e 1d -f "/path/xxx.mp3" -r 1.2

or

  1. py run.py -e 2d -f "/path/xxx.mp3" -r 1.2

or

  1. py run.py -e 3d -f "/path/xxx.mp3" -r 1.2

Parameters Description:

  1. Select visualization style.
  2. Audio file path.(output device mode only)
  3. Playback rate.(output device mode only)
  4. Delay time to play the animation.

Demo

bilibili

Screenshot

demo1
demo2
demo3