[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EED3R85SESP26NCKZ06Y7S":3,"skill-same:01M6EED3R85SESP26NCKZ06Y7S":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":30,"linkOnly":31,"markdownContent":32,"markdownBody":32,"frontMatter":33,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":37,"repositoryHtmlUrl":38,"repositoryHomepageUrl":39,"ownerHtmlUrl":40,"ownerBlogUrl":7,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M6EED3R85SESP26NCKZ06Y7S","audiowaveform","音频波形图生成",null,"","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Faudiowaveform\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BR5V816HPKFXP1YV56C07K","多媒体工程师","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BR82CCRKG2HNYVFH5H6GZ0","音频与语音处理","SCENARIO","使用场景",[5],"2026-11-10 10:12:30",false,"# Audiowaveform\n\n## Overview\n\nGenerate waveform visualizations from audio files using BBC's audiowaveform tool. Renders PNG\u002FSVG 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.\n\n## Instructions\n\n### Step 1: Installation\n\n```bash\n# Ubuntu\u002FDebian\napt install -y audiowaveform\n\n# macOS\nbrew install audiowaveform\n\n# From source (if not in repos)\napt install -y cmake g++ libmad0-dev libsndfile1-dev libgd-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev\ngit clone https:\u002F\u002Fgithub.com\u002Fbbc\u002Faudiowaveform.git\ncd audiowaveform && mkdir build && cd build\ncmake .. && make && make install\n\n# Verify\naudiowaveform --version\n```\n\n### Step 2: Generate Waveform Images\n\n**Basic PNG waveform:**\n```bash\naudiowaveform -i episode.wav -o waveform.png\n```\n\n**Customized waveform:**\n```bash\naudiowaveform -i episode.mp3 -o waveform.png \\\n  --width 1800 \\\n  --height 200 \\\n  --colors audacity \\\n  --background-color ffffff \\\n  --waveform-color 3b82f6 \\\n  --axis-label-color 666666 \\\n  --border-color ffffff \\\n  --zoom auto\n```\n\n**Color schemes:**\n- `audacity` — classic Audacity look\n- Custom: use hex `--waveform-color`, `--background-color`\n\n**High-res for social media (1200x630 — OG image size):**\n```bash\naudiowaveform -i episode.wav -o social-preview.png \\\n  --width 1200 --height 630 \\\n  --background-color 1a1a2e \\\n  --waveform-color 00d4ff \\\n  --no-axis-labels\n```\n\n**Specific time range:**\n```bash\naudiowaveform -i episode.wav -o clip.png \\\n  --start 60 --end 180 \\\n  --width 800 --height 150\n```\n\n**Split channels (stereo):**\n```bash\naudiowaveform -i stereo.wav -o waveform.png --split-channels\n```\n\n### Step 3: Generate Waveform Data (JSON)\n\nFor web players that render waveforms client-side:\n\n```bash\n# JSON output (peaks data)\naudiowaveform -i episode.wav -o peaks.json \\\n  --pixels-per-second 20 \\\n  --bits 8\n\n# Binary format (smaller files)\naudiowaveform -i episode.wav -o peaks.dat \\\n  --pixels-per-second 20 \\\n  --bits 8\n```\n\n**JSON structure:**\n```json\n{\n  \"version\": 2,\n  \"channels\": 1,\n  \"sample_rate\": 44100,\n  \"samples_per_pixel\": 2205,\n  \"bits\": 8,\n  \"length\": 1200,\n  \"data\": [0, 45, -3, 67, 12, 89, ...]\n}\n```\n\n**Pixels-per-second guidelines:**\n- `20` — good for full episode overview (podcast, 1-2h)\n- `50` — detailed view for songs (3-5 min)\n- `100` — very detailed, for short clips\n- `200+` — waveform editing precision\n\n### Step 4: Web Player Integration\n\n**With wavesurfer.js:**\n```html\n\u003Cdiv id=\"waveform\">\u003C\u002Fdiv>\n\u003Cbutton onclick=\"wavesurfer.playPause()\">Play\u002FPause\u003C\u002Fbutton>\n\n\u003Cscript src=\"https:\u002F\u002Funpkg.com\u002Fwavesurfer.js@7\">\u003C\u002Fscript>\n\u003Cscript>\nconst wavesurfer = WaveSurfer.create({\n  container: \"#waveform\",\n  waveColor: \"#3b82f6\",\n  progressColor: \"#1d4ed8\",\n  cursorColor: \"#ef4444\",\n  barWidth: 2,\n  barRadius: 2,\n  barGap: 1,\n  height: 80,\n  responsive: true,\n  \u002F\u002F Use pre-generated peaks for instant rendering\n  peaks: null, \u002F\u002F Will load from JSON\n  url: \"\u002Faudio\u002Fepisode.mp3\",\n});\n\n\u002F\u002F Load pre-generated peaks (skip client-side decoding)\nfetch(\"\u002Fwaveforms\u002Fepisode-peaks.json\")\n  .then(r => r.json())\n  .then(data => {\n    wavesurfer.load(\"\u002Faudio\u002Fepisode.mp3\", [data.data]);\n  });\n\u003C\u002Fscript>\n```\n\n**With peaks.js (BBC):**\n```html\n\u003Cdiv id=\"zoomview-container\">\u003C\u002Fdiv>\n\u003Cdiv id=\"overview-container\">\u003C\u002Fdiv>\n\n\u003Cscript src=\"https:\u002F\u002Funpkg.com\u002Fpeaks.js\">\u003C\u002Fscript>\n\u003Cscript>\nconst audioElement = document.getElementById(\"audio\");\n\nPeaks.init({\n  containers: {\n    zoomview: document.getElementById(\"zoomview-container\"),\n    overview: document.getElementById(\"overview-container\"),\n  },\n  mediaElement: audioElement,\n  dataUri: {\n    json: \"\u002Fwaveforms\u002Fepisode-peaks.json\",\n  },\n  zoomLevels: [256, 512, 1024, 2048],\n  overview: {\n    waveformColor: \"#3b82f6\",\n    playedWaveformColor: \"#1d4ed8\",\n  },\n  zoomview: {\n    waveformColor: \"#3b82f6\",\n    playedWaveformColor: \"#1d4ed8\",\n  },\n}, (err, peaks) => {\n  if (err) console.error(err);\n  \u002F\u002F peaks instance ready\n});\n\u003C\u002Fscript>\n```\n\n### Step 5: Batch Processing & Pipeline\n\n**Generate waveforms for all episodes:**\n```bash\n#!\u002Fbin\u002Fbash\n# generate-waveforms.sh\nAUDIO_DIR=\".\u002Fepisodes\"\nOUT_DIR=\".\u002Fwaveforms\"\nmkdir -p \"$OUT_DIR\"\n\nfor f in \"$AUDIO_DIR\"\u002F*.{mp3,wav}; do\n  [ -f \"$f\" ] || continue\n  base=$(basename \"$f\" | sed 's\u002F\\.[^.]*$\u002F\u002F')\n  \n  # PNG preview\n  audiowaveform -i \"$f\" -o \"$OUT_DIR\u002F${base}.png\" \\\n    --width 1200 --height 150 \\\n    --background-color ffffff --waveform-color 3b82f6\n\n  # JSON peaks for web player\n  audiowaveform -i \"$f\" -o \"$OUT_DIR\u002F${base}.json\" \\\n    --pixels-per-second 20 --bits 8\n\n  # Social media preview\n  audiowaveform -i \"$f\" -o \"$OUT_DIR\u002F${base}-social.png\" \\\n    --width 1200 --height 630 \\\n    --background-color 0f172a --waveform-color 38bdf8 --no-axis-labels\n\n  echo \"✅ $base\"\ndone\n```\n\n### Step 6: Convert Between Formats\n\n```bash\n# Binary → JSON\naudiowaveform -i peaks.dat -o peaks.json\n\n# JSON → PNG (render from pre-computed data)\naudiowaveform -i peaks.json -o waveform.png \\\n  --width 1200 --height 200 \\\n  --zoom auto\n\n# From raw audio → multiple outputs\naudiowaveform -i input.wav -o peaks.dat --bits 8 --pixels-per-second 20\naudiowaveform -i peaks.dat -o overview.png --width 2000 --height 100\naudiowaveform -i peaks.dat -o detail.png --start 60 --end 120 --width 800 --height 200\n```\n\n## Examples\n\n### Example 1: Generate waveform previews for a podcast website\n**User prompt:** \"I have 50 podcast episodes as MP3 files in .\u002Fepisodes\u002F. Generate PNG waveform previews and JSON peak data for each one so I can use them with wavesurfer.js on my Next.js site.\"\n\nThe agent will:\n1. Verify audiowaveform is installed, install it via `apt` or `brew` if missing.\n2. Create output directories `.\u002Fwaveforms\u002Fpng\u002F` and `.\u002Fwaveforms\u002Fjson\u002F`.\n3. Write a bash loop that iterates over all `.mp3` files in `.\u002Fepisodes\u002F`, generating a 1200x150 PNG with brand colors and a JSON peaks file at 20 pixels-per-second with 8-bit depth for each episode.\n4. Run the batch script and report how many waveforms were generated.\n5. Show a wavesurfer.js code snippet that loads the pre-generated JSON peaks for instant waveform rendering without client-side audio decoding.\n\n### Example 2: Create social media audio preview images\n**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.\"\n\nThe agent will:\n1. Identify the audio files for episodes 10-15 in the episodes directory.\n2. Run audiowaveform for each file with `--width 1200 --height 630` (OG image dimensions), `--background-color 0f172a`, `--waveform-color 06b6d4`, and `--no-axis-labels`.\n3. Save output files as `episode-10-social.png` through `episode-15-social.png`.\n4. Confirm the files were generated and note their file sizes.\n\n## Guidelines\n\n- 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.\n- Use `--pixels-per-second 20` with `--bits 8` for JSON peaks data intended for web players; higher values produce unnecessarily large files for overview waveforms.\n- Pre-generate waveform JSON server-side rather than decoding audio client-side; this eliminates multi-second load times for listeners on the web.\n- For social media images, use `--no-axis-labels` to produce cleaner graphics without time markers that clutter the visual at small sizes.\n- When processing large batches, generate the binary `.dat` format first, then render PNGs and JSONs from the `.dat` file to avoid re-reading the audio multiple times.\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FTerminalSkills\u002Fskills\u002Faudiowaveform",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":9,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill audiowaveform",{"tool":49,"command":50},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill audiowaveform",{"tool":52,"command":53},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill audiowaveform","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Faudiowaveform\u002FSKILL.md",true,[],[58,67,76,85,91,97],{"skillNo":59,"name":60,"nameZh":7,"description":7,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":30},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[64,65,66],"model","model hierarchy","model hierarchy skill",{"skillNo":68,"name":69,"nameZh":7,"description":7,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":30},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[73,74,75],"MCP","zoom","zoom mcp",{"skillNo":77,"name":78,"nameZh":7,"description":7,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":30},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[82,83,84,74],"sdk","zoom apps sdk","apps",{"skillNo":86,"name":87,"nameZh":7,"description":7,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":30},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[87],{"skillNo":92,"name":93,"nameZh":7,"description":7,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":30},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[93],{"skillNo":98,"name":99,"nameZh":7,"description":7,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":30},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[99]]