Draw mp3 waveform in Python

Introduction

I wanted to display an mp3 file as a waveform in order to extract the characteristics of the music.

code

test.py


import librosa

a = librosa.load('test.mp3')
librosa.display.waveplot(a[0],sr=22050)

result

ダウンロード.png

reference

I referred to the following. Urban Sound Classification with Neural Networks in Tensorflow

Thank you very much.

Recommended Posts

Draw mp3 waveform in Python
Waveform envelope in Python
Draw graph in python
Draw Poincare's disk in Python
Draw "Draw Ferns Programmatically" in Python
Draw implicit function in python
Draw a heart in Python
Draw Sine Waves in Blender Python
Draw knots interactively in Plotly (Python)
Draw a scatterplot matrix in python
Waveform display of audio in Python
Draw a CNN diagram in Python
Python in optimization
CURL in python
Metaprogramming in Python
Python 3.3 in Anaconda
Geocoding in python
Meta-analysis in Python
Unittest in python
Draw Nozomi Sasaki in Excel with python
Epoch in Python
Discord in Python
Draw a heart in Python Part 2 (SymPy)
Sudoku in Python
DCI in Python
quicksort in python
nCr in python
N-Gram in Python
Programming in python
Plink in Python
Constant in python
Lifegame in Python.
FizzBuzz in Python
Sqlite in python
StepAIC in Python
Draw a tree in Python 3 using graphviz
N-gram in python
LINE-Bot [0] in Python
Csv in python
Disassemble in Python
Reflection in Python
Constant in python
nCr in Python.
format in python
Scons in Python3
Puyo Puyo in python
python in virtualenv
PPAP in Python
Quad-tree in Python
Reflection in Python
Chemistry in Python
Hashable in python
DirectLiNGAM in Python
LiNGAM in Python
Flatten in python
flatten in python
Draw a graph of a quadratic function in Python
Draw contour lines that appear in textbooks (Python)
Draw graphs in Julia ... Leave the graphs to Python
[Python] How to draw a histogram in Matplotlib
Daily AtCoder # 36 in Python