1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

SoXでmp3ファイルからスペクトログラムを作成する方法

Posted at

SoX(Sound eXchange)とは音声処理ユーティリティです。
soxコマンドでmp3ファイルからスペクトログラムを作成する方法を説明します。

ffmpegでステレオのmp3をモノラルのmp3に変換

$ ffmpeg -i sound01.mp3 -ac 1 sound01-mono.mp3

# モノラルは-ac 1
# ストレオは-ac 2

mp3モノラルの音源の波形

mp3_sound01.png

mp3モノラルの音源からスペクトログラムを作成

$ sox sound01-mono.mp3 -n spectrogram -o sound01-mono.png

スペクトログラムの作成結果の画像

sound01-mono.png

SoXのバージョンの確認

$ sox --version
sox:      SoX v
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?