audiowaveform
音声ファイルから波形画像を生成し、ウェブプレイヤーへの組み込みやソーシャルメディアでの共有、JSONデータ抽出など、様々な用途で音声波形を視覚的に表現するSkill。
📜 元の英語説明(参考)
Generate waveform visualizations from audio files. Use when a user asks to create waveform images, build audio player visualizations, generate waveform data for web players, create podcast episode previews, build audio thumbnails, render waveform PNGs for social media, extract peak data as JSON, or integrate waveform generation into audio processing pipelines. Covers audiowaveform CLI, JSON/binary data output, and web player integration.
🇯🇵 日本人クリエイター向け解説
音声ファイルから波形画像を生成し、ウェブプレイヤーへの組み込みやソーシャルメディアでの共有、JSONデータ抽出など、様々な用途で音声波形を視覚的に表現するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o audiowaveform.zip https://jpskill.com/download/14656.zip && unzip -o audiowaveform.zip && rm audiowaveform.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/14656.zip -OutFile "$d\audiowaveform.zip"; Expand-Archive "$d\audiowaveform.zip" -DestinationPath $d -Force; ri "$d\audiowaveform.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
audiowaveform.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
audiowaveformフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Audiowaveform
概要
BBCのaudiowaveformツールを使用して、オーディオファイルから波形ビジュアライゼーションを生成します。PNG/SVG波形画像をレンダリングし、ウェブベースのオーディオプレーヤー(wavesurfer.js、peaks.js)用のピークデータをJSONまたはバイナリとして出力します。ポッドキャストプレーヤー、音楽プラットフォーム、ソーシャルメディアのオーディオプレビュー、およびオーディオ波形を表示するあらゆるUIに最適です。
手順
ステップ 1: インストール
# Ubuntu/Debian
apt install -y audiowaveform
# macOS
brew install audiowaveform
# ソースから (リポジトリにない場合)
apt install -y cmake g++ libmad0-dev libsndfile1-dev libgd-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev
git clone https://github.com/bbc/audiowaveform.git
cd audiowaveform && mkdir build && cd build
cmake .. && make && make install
# 確認
audiowaveform --version
ステップ 2: 波形画像の生成
基本的なPNG波形:
audiowaveform -i episode.wav -o waveform.png
カスタマイズされた波形:
audiowaveform -i episode.mp3 -o waveform.png \
--width 1800 \
--height 200 \
--colors audacity \
--background-color ffffff \
--waveform-color 3b82f6 \
--axis-label-color 666666 \
--border-color ffffff \
--zoom auto
カラースキーム:
audacity— 古典的なAudacityの外観- カスタム: 16進数の
--waveform-color、--background-colorを使用
ソーシャルメディア用の高解像度 (1200x630 — OG画像サイズ):
audiowaveform -i episode.wav -o social-preview.png \
--width 1200 --height 630 \
--background-color 1a1a2e \
--waveform-color 00d4ff \
--no-axis-labels
特定の時間範囲:
audiowaveform -i episode.wav -o clip.png \
--start 60 --end 180 \
--width 800 --height 150
チャンネルの分割 (ステレオ):
audiowaveform -i stereo.wav -o waveform.png --split-channels
ステップ 3: 波形データ (JSON) の生成
クライアント側で波形をレンダリングするウェブプレーヤーの場合:
# JSON出力 (ピークデータ)
audiowaveform -i episode.wav -o peaks.json \
--pixels-per-second 20 \
--bits 8
# バイナリ形式 (より小さいファイル)
audiowaveform -i episode.wav -o peaks.dat \
--pixels-per-second 20 \
--bits 8
JSON構造:
{
"version": 2,
"channels": 1,
"sample_rate": 44100,
"samples_per_pixel": 2205,
"bits": 8,
"length": 1200,
"data": [0, 45, -3, 67, 12, 89, ...]
}
Pixels-per-secondのガイドライン:
20— エピソード全体の概要に適しています (ポッドキャスト、1〜2時間)50— 曲の詳細な表示に適しています (3〜5分)100— 非常に詳細、短いクリップ向け200+— 波形編集の精度
ステップ 4: ウェブプレーヤーとの統合
wavesurfer.jsを使用:
<div id="waveform"></div>
<button onclick="wavesurfer.playPause()">Play/Pause</button>
<script src="https://unpkg.com/wavesurfer.js@7"></script>
<script>
const wavesurfer = WaveSurfer.create({
container: "#waveform",
waveColor: "#3b82f6",
progressColor: "#1d4ed8",
cursorColor: "#ef4444",
barWidth: 2,
barRadius: 2,
barGap: 1,
height: 80,
responsive: true,
// 事前に生成されたピークを使用して即座にレンダリング
peaks: null, // JSONからロードされます
url: "/audio/episode.mp3",
});
// 事前に生成されたピークをロードします (クライアント側のデコードをスキップ)
fetch("/waveforms/episode-peaks.json")
.then(r => r.json())
.then(data => {
wavesurfer.load("/audio/episode.mp3", [data.data]);
});
</script>
peaks.js (BBC)を使用:
<div id="zoomview-container"></div>
<div id="overview-container"></div>
<script src="https://unpkg.com/peaks.js"></script>
<script>
const audioElement = document.getElementById("audio");
Peaks.init({
containers: {
zoomview: document.getElementById("zoomview-container"),
overview: document.getElementById("overview-container"),
},
mediaElement: audioElement,
dataUri: {
json: "/waveforms/episode-peaks.json",
},
zoomLevels: [256, 512, 1024, 2048],
overview: {
waveformColor: "#3b82f6",
playedWaveformColor: "#1d4ed8",
},
zoomview: {
waveformColor: "#3b82f6",
playedWaveformColor: "#1d4ed8",
},
}, (err, peaks) => {
if (err) console.error(err);
// peaksインスタンスの準備完了
});
</script>
ステップ 5: バッチ処理とパイプライン
すべてのエピソードの波形を生成:
#!/bin/bash
# generate-waveforms.sh
AUDIO_DIR="./episodes"
OUT_DIR="./waveforms"
mkdir -p "$OUT_DIR"
for f in "$AUDIO_DIR"/*.{mp3,wav}; do
[ -f "$f" ] || continue
base=$(basename "$f" | sed 's/\.[^.]*$//')
# PNGプレビュー
audiowaveform -i "$f" -o "$OUT_DIR/${base}.png" \
--width 1200 --height 150 \
--background-color ffffff --waveform-color 3b82f6
# ウェブプレーヤー用のJSONピーク
audiowaveform -i "$f" -o "$OUT_DIR/${base}.json" \
--pixels-per-second 20 --bits 8
# ソーシャルメディアプレビュー
audiowaveform -i "$f" -o "$OUT_DIR/${base}-social.png" \
--width 1200 --height 630 \
--background-color 0f172a --waveform-color 38bdf8 --no-axis-labels
echo "✅ $base"
done
ステップ 6: 形式間の変換
# バイナリ → JSON
audiowaveform -i peaks.dat -o peaks.json
# JSON → PNG (事前に計算されたデータからレンダリング)
audiowaveform -i peaks.json -o waveform.png \
--width 1200 --height 200 \
--zoom auto
# 生のオーディオ → 複数の出力
audiowaveform -i input.wav -o peaks.dat --bits 8 --pixels-per-second 20
audiowaveform -i peaks.dat -o overview.png --width 2000 --height 100
audiowaveform -i peaks.dat -o detail.png --start 60 --end 120 --width 800 --height 200
例
例 1: ポッドキャストウェブサイトの波形プレビューを生成する
ユーザープロンプト: 「./episodes/にMP3ファイルとして50個のポッドキャストエピソードがあります。それらすべてについて、PNG波形プレビューとJSONピークデータを生成して、Next.jsサイトでwavesurfer.jsで使用できるようにしたいです。」
エージェントは以下を行います:
- audiowaveformがインストールされていることを確認し、インストールされていない場合は
aptまたはbrewでインストールします。 - 出力ディレクトリ
./waveforms/png/と./waveforms/json/を作成します。 ./episodes/内のすべての.mp3ファイルを反復処理するbashループを作成し、ブランドカラーの1200x150 PNGと、8で20 pixels-per-secondのJSONピークファイルを生成します。
(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Audiowaveform
Overview
Generate waveform visualizations from audio files using BBC's audiowaveform tool. Renders PNG/SVG waveform images and outputs peak data as JSON or binary for web-based audio players (wavesurfer.js, peaks.js). Ideal for podcast players, music platforms, social media audio previews, and any UI that shows audio waveforms.
Instructions
Step 1: Installation
# Ubuntu/Debian
apt install -y audiowaveform
# macOS
brew install audiowaveform
# From source (if not in repos)
apt install -y cmake g++ libmad0-dev libsndfile1-dev libgd-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev
git clone https://github.com/bbc/audiowaveform.git
cd audiowaveform && mkdir build && cd build
cmake .. && make && make install
# Verify
audiowaveform --version
Step 2: Generate Waveform Images
Basic PNG waveform:
audiowaveform -i episode.wav -o waveform.png
Customized waveform:
audiowaveform -i episode.mp3 -o waveform.png \
--width 1800 \
--height 200 \
--colors audacity \
--background-color ffffff \
--waveform-color 3b82f6 \
--axis-label-color 666666 \
--border-color ffffff \
--zoom auto
Color schemes:
audacity— classic Audacity look- Custom: use hex
--waveform-color,--background-color
High-res for social media (1200x630 — OG image size):
audiowaveform -i episode.wav -o social-preview.png \
--width 1200 --height 630 \
--background-color 1a1a2e \
--waveform-color 00d4ff \
--no-axis-labels
Specific time range:
audiowaveform -i episode.wav -o clip.png \
--start 60 --end 180 \
--width 800 --height 150
Split channels (stereo):
audiowaveform -i stereo.wav -o waveform.png --split-channels
Step 3: Generate Waveform Data (JSON)
For web players that render waveforms client-side:
# JSON output (peaks data)
audiowaveform -i episode.wav -o peaks.json \
--pixels-per-second 20 \
--bits 8
# Binary format (smaller files)
audiowaveform -i episode.wav -o peaks.dat \
--pixels-per-second 20 \
--bits 8
JSON structure:
{
"version": 2,
"channels": 1,
"sample_rate": 44100,
"samples_per_pixel": 2205,
"bits": 8,
"length": 1200,
"data": [0, 45, -3, 67, 12, 89, ...]
}
Pixels-per-second guidelines:
20— good for full episode overview (podcast, 1-2h)50— detailed view for songs (3-5 min)100— very detailed, for short clips200+— waveform editing precision
Step 4: Web Player Integration
With wavesurfer.js:
<div id="waveform"></div>
<button onclick="wavesurfer.playPause()">Play/Pause</button>
<script src="https://unpkg.com/wavesurfer.js@7"></script>
<script>
const wavesurfer = WaveSurfer.create({
container: "#waveform",
waveColor: "#3b82f6",
progressColor: "#1d4ed8",
cursorColor: "#ef4444",
barWidth: 2,
barRadius: 2,
barGap: 1,
height: 80,
responsive: true,
// Use pre-generated peaks for instant rendering
peaks: null, // Will load from JSON
url: "/audio/episode.mp3",
});
// Load pre-generated peaks (skip client-side decoding)
fetch("/waveforms/episode-peaks.json")
.then(r => r.json())
.then(data => {
wavesurfer.load("/audio/episode.mp3", [data.data]);
});
</script>
With peaks.js (BBC):
<div id="zoomview-container"></div>
<div id="overview-container"></div>
<script src="https://unpkg.com/peaks.js"></script>
<script>
const audioElement = document.getElementById("audio");
Peaks.init({
containers: {
zoomview: document.getElementById("zoomview-container"),
overview: document.getElementById("overview-container"),
},
mediaElement: audioElement,
dataUri: {
json: "/waveforms/episode-peaks.json",
},
zoomLevels: [256, 512, 1024, 2048],
overview: {
waveformColor: "#3b82f6",
playedWaveformColor: "#1d4ed8",
},
zoomview: {
waveformColor: "#3b82f6",
playedWaveformColor: "#1d4ed8",
},
}, (err, peaks) => {
if (err) console.error(err);
// peaks instance ready
});
</script>
Step 5: Batch Processing & Pipeline
Generate waveforms for all episodes:
#!/bin/bash
# generate-waveforms.sh
AUDIO_DIR="./episodes"
OUT_DIR="./waveforms"
mkdir -p "$OUT_DIR"
for f in "$AUDIO_DIR"/*.{mp3,wav}; do
[ -f "$f" ] || continue
base=$(basename "$f" | sed 's/\.[^.]*$//')
# PNG preview
audiowaveform -i "$f" -o "$OUT_DIR/${base}.png" \
--width 1200 --height 150 \
--background-color ffffff --waveform-color 3b82f6
# JSON peaks for web player
audiowaveform -i "$f" -o "$OUT_DIR/${base}.json" \
--pixels-per-second 20 --bits 8
# Social media preview
audiowaveform -i "$f" -o "$OUT_DIR/${base}-social.png" \
--width 1200 --height 630 \
--background-color 0f172a --waveform-color 38bdf8 --no-axis-labels
echo "✅ $base"
done
Step 6: Convert Between Formats
# Binary → JSON
audiowaveform -i peaks.dat -o peaks.json
# JSON → PNG (render from pre-computed data)
audiowaveform -i peaks.json -o waveform.png \
--width 1200 --height 200 \
--zoom auto
# From raw audio → multiple outputs
audiowaveform -i input.wav -o peaks.dat --bits 8 --pixels-per-second 20
audiowaveform -i peaks.dat -o overview.png --width 2000 --height 100
audiowaveform -i peaks.dat -o detail.png --start 60 --end 120 --width 800 --height 200
Examples
Example 1: Generate waveform previews for a podcast website
User prompt: "I have 50 podcast episodes as MP3 files in ./episodes/. Generate PNG waveform previews and JSON peak data for each one so I can use them with wavesurfer.js on my Next.js site."
The agent will:
- Verify audiowaveform is installed, install it via
aptorbrewif missing. - Create output directories
./waveforms/png/and./waveforms/json/. - Write a bash loop that iterates over all
.mp3files in./episodes/, generating a 1200x150 PNG with brand colors and a JSON peaks file at 20 pixels-per-second with 8-bit depth for each episode. - Run the batch script and report how many waveforms were generated.
- Show a wavesurfer.js code snippet that loads the pre-generated JSON peaks for instant waveform rendering without client-side audio decoding.
Example 2: Create social media audio preview images
User prompt: "I need OG-image-sized waveform graphics for sharing podcast episodes on Twitter. Dark background, cyan waveform, no axis labels. Do episodes 10 through 15."
The agent will:
- Identify the audio files for episodes 10-15 in the episodes directory.
- Run audiowaveform for each file with
--width 1200 --height 630(OG image dimensions),--background-color 0f172a,--waveform-color 06b6d4, and--no-axis-labels. - Save output files as
episode-10-social.pngthroughepisode-15-social.png. - Confirm the files were generated and note their file sizes.
Guidelines
- Always check that audiowaveform is installed before running commands; it is not available in most default package managers and may require building from source on older systems.
- Use
--pixels-per-second 20with--bits 8for JSON peaks data intended for web players; higher values produce unnecessarily large files for overview waveforms. - Pre-generate waveform JSON server-side rather than decoding audio client-side; this eliminates multi-second load times for listeners on the web.
- For social media images, use
--no-axis-labelsto produce cleaner graphics without time markers that clutter the visual at small sizes. - When processing large batches, generate the binary
.datformat first, then render PNGs and JSONs from the.datfile to avoid re-reading the audio multiple times.