https://github.com/kazuhito00/draw-audio-spectrum-using-opencv
オーディオスペクトラムや波形をOpenCVで描画するサンプル
https://github.com/kazuhito00/draw-audio-spectrum-using-opencv
audio-spectrum fft opencv pyaudio
Last synced: 6 months ago
JSON representation
オーディオスペクトラムや波形をOpenCVで描画するサンプル
- Host: GitHub
- URL: https://github.com/kazuhito00/draw-audio-spectrum-using-opencv
- Owner: Kazuhito00
- License: apache-2.0
- Created: 2022-08-13T06:55:52.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-14T13:03:27.000Z (almost 3 years ago)
- Last Synced: 2023-03-04T13:14:43.074Z (about 2 years ago)
- Topics: audio-spectrum, fft, opencv, pyaudio
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 12
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Draw-Audio-Spectrogram-Using-OpenCV
オーディオスペクトラムや波形をOpenCVで描画するサンプルです。# Requirement
```
opencv-python 4.5.5.62 or later
PyAudio 0.2.11 or later
```WindowsでPyAudioをインストールしたい方は、自力でビルドするか、
[非公式のWindowsビルドPyAudio](https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio)を用いてください。# Contents
No.0
![]()
No.1
![]()
No.2
![]()
No.3
![]()
No.4
![]()
# Usage
デモの実行方法は以下です。
```bash
python sample.py
```
* --device
マイクなどの入力デバイス番号の指定
デフォルト:1
* --wave
Waveファイルの指定 ※指定時はマイクデバイスより優先
デフォルト:指定なし
* --frames
フレーム読み出し数
デフォルト:2048
* --fft_n
FFTポイント数
デフォルト:1024
* --draw_type
Contentsの描画種別
デフォルト:0# Author
高橋かずひと(https://twitter.com/KzhtTkhs)
# License
Draw-Audio-Spectrogram-Using-OpenCV is under [Apache-2.0 license](LICENSE).