mcpField
A
audio-visualization

audio-visualization

github.com/eachlabs创意与媒体44317 次安装今天更新
代码仓库

关于 audio-visualization

面向音乐人、播客制作者和视频创作者的音频可视化生成技能,借助 each::sense 将音频转为波形、频谱、粒子或 3D 视觉,并支持节拍同步与多轮调整。

主要功能

  1. 01生成波形与频谱可视化
  2. 02制作圆形、粒子和 3D 效果
  3. 03生成抽象与品牌视觉
  4. 04创建节拍同步动画
  5. 05通过会话迭代设计

适用场景

  1. 01为音乐曲目制作可视化视频
  2. 02为播客制作简洁波形视频
  3. 03为社交媒体生成方形或竖屏视觉
  4. 04按节拍制作动画效果

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/eachlabs/skills --skill audio-visualization

安装后在 Claude Code 中输入/audio-visualization确认已加载。

附带文件references/SSE-EVENTS.md

详细介绍

音频可视化

使用 each::sense 生成惊艳的音频可视化视频。这项技能可创建音频的动态视觉呈现,包括波形、频谱分析仪、粒子效果、3D 可视化和节拍同步动画。

功能

  • 波形可视化器:经典示波器风格的音频波形
  • 频谱分析仪:可自定义样式的频率柱状可视化
  • 圆形可视化器:径向音频响应设计
  • 粒子系统:由音频驱动的粒子效果和爆炸效果
  • 3D 可视化:沉浸式三维音频景观
  • 抽象响应视觉效果:艺术化、抽象的音频响应视觉效果
  • 播客波形:适用于播客和语音内容的简洁极简波形
  • 音乐视频:带有特效的完整音乐视频可视化器
  • 节拍同步动画:与节拍和节奏完美同步的动画
  • 品牌可视化器:定制品牌音频可视化

快速入门

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a neon waveform visualizer video for this electronic music track, purple and cyan colors, 16:9 format"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "audio_urls": ["https://example.com/music-track.mp3"]
  }'

可视化风格

风格描述适用场景
波形经典示波器波形图案音乐、播客、语音
频谱柱频率分析仪柱状图EDM、电子音乐
圆形径向音频响应环专辑封面、社交媒体
粒子音频驱动的粒子系统戏剧性、充满活力的曲目
3D 景观三维地形/形状沉浸式内容
抽象艺术化的流体/几何图案创意、艺术类视频
极简简洁、简单的波形播客、访谈

用例示例

1. 波形可视化器
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a smooth waveform visualizer video for this audio. Use a gradient from electric blue to pink, dark background, 1080p 16:9 format. The waveform should be centered and react smoothly to the audio frequencies."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "audio_urls": ["https://example.com/song.mp3"]
  }'
2. 频谱分析仪柱状图
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Generate a spectrum analyzer visualization with vertical bars that react to the music. EDM style with neon green and yellow gradient bars on a black background. Add glow effects and mirror reflection at the bottom. 1920x1080 landscape video."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "audio_urls": ["https://example.com/edm-track.mp3"]
  }'
3. 圆形音频可视化器
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a circular audio visualizer with radial bars emanating from the center. Place an album art placeholder in the center circle. Use warm orange and red colors with a subtle pulsing glow effect. Square 1:1 format for social media."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "audio_urls": ["https://example.com/album-track.mp3"]
  }'
4. 基于粒子的可视化器
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Generate an audio-reactive particle system visualization. Particles should explode outward on bass hits and swirl gently during quieter sections. Use a cosmic color palette with blues, purples, and white sparkles. Deep space background. 16:9 HD video."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "audio_urls": ["https://example.com/electronic.mp3"]
  }'
5. 3D 音频可视化
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a 3D audio visualization with a geometric landscape that responds to the music. The terrain should rise and fall with the frequencies, camera slowly moving forward through the scene. Synthwave aesthetic with neon grid lines, pink and cyan lighting. 1080p cinematic format."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "audio_urls": ["https://example.com/synthwave.mp3"]
  }'
6. 抽象响应视觉效果
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Generate abstract audio-reactive visuals with fluid, organic shapes that morph and flow with the music. Use a dreamy color palette with soft pastels transitioning through the spectrum. The visuals should feel like living art, responding to both rhythm and melody. Vertical 9:16 format for Instagram Reels."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "audio_urls": ["https://example.com/ambient-track.mp3"]
  }'
7. 播客波形视频
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a clean, minimal podcast waveform video. Simple horizontal waveform bar in the center that responds to voice audio. White waveform on a dark gray background. Leave space at the top for a podcast title and bottom for episode info. Professional and clean look. Square 1:1 format."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "eco",
    "audio_urls": ["https://example.com/podcast-episode.mp3"]
  }'
8. 音乐视频可视化器
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a full music video visualizer combining multiple effects. Start with abstract flowing shapes, transition to particle bursts during the chorus, and include subtle waveform elements throughout. High energy, colorful, psychedelic style matching the energetic music. 1920x1080 landscape format, full track length."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "audio_urls": ["https://example.com/full-song.mp3"]
  }'
9. 节拍同步动画
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Generate a beat-synced animation where geometric shapes pulse, rotate, and transform exactly on the beat. Sharp, precise animations on every kick drum and snare hit. Minimal black and white design with red accent flashes on the strongest beats. Perfect sync is critical. 16:9 HD video."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "audio_urls": ["https://example.com/drum-track.mp3"]
  }'
10. 定制品牌可视化器
# Initial branded visualizer
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a branded audio visualizer for a record label. Use brand colors: deep purple (#6B21A8) and gold (#F59E0B). Include a circular visualizer with space in the center for a logo. Add a subtle animated gradient background. Professional, premium feel. 1:1 square format for social media."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "audio_urls": ["https://example.com/label-release.mp3"],
    "session_id": "branded-viz-001"
  }'

# Iterate on the design
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Add more gold particle sparkles that react to high frequencies, and make the purple glow more intense on bass hits"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "branded-viz-001"
  }'

最佳实践

音频质量
  • 文件格式:支持 MP3、WAV、FLAC、AAC
  • 采样率:建议使用 44.1kHz 或更高
  • 清晰音频:干净的音频能生成更好的可视化效果
  • 音量级别:标准化音频可防止视觉效果出现削波
视觉设计
  • 对比度:视觉效果与背景之间应有较高的对比度
  • 色彩协调:使用互补色或类似色配色方案
  • 响应性:让视觉强度与音频动态相匹配
  • 安全区域:留出边距,避免平台 UI 覆盖内容
格式指南
平台宽高比分辨率备注
YouTube16:91920x1080横向、全高清
Instagram 帖子1:11080x1080正方形格式
Instagram Reels9:161080x1920竖屏,兼容 Stories
TikTok9:161080x1920竖屏格式
Spotify Canvas9:16720x12803-8 秒循环
SoundCloud16:91280x720波形风格很受欢迎

音频可视化提示词技巧

在提示词中加入以下细节:

  1. 可视化类型:波形、频谱、圆形、粒子、3D、抽象
  2. 配色方案:具体颜色、渐变或调色板风格
  3. 背景:纯色、渐变、动态、太空等
  4. 效果:发光、模糊、反射、粒子、轨迹
  5. 响应性:低音、中音、高音、节拍分别触发什么效果
  6. 格式:宽高比和分辨率
  7. 风格:EDM、极简、迷幻、企业风格等
  8. 品牌元素:为 Logo、文字叠加预留空间
示例提示词结构
"Create a [visualization type] for [audio type/genre].
Use [color scheme] with [background style].
Add [effects] that react to [audio elements].
[Format and resolution]. [Style description]."

模式选择

“您想要快速且省钱,还是高质量?”

模式适用场景速度质量
max正式发行作品、音乐视频、高端内容较慢最高
eco草稿、预览、社交媒体片段、播客较快良好

多轮创意迭代

使用 session_id 迭代可视化效果:

# Initial visualization
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a spectrum analyzer visualization for this EDM track"}],
    "model": "eachsense/beta",
    "stream": true,
    "audio_urls": ["https://example.com/track.mp3"],
    "session_id": "viz-project-001"
  }'

# Refine colors
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Change the color scheme to cyan and magenta, add more glow"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "viz-project-001"
  }'

# Add effects
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Add particle trails on the peaks and a subtle mirror reflection"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "viz-project-001"
  }'

多个音轨的批量生成

# Track 1
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a circular visualizer for this track, purple and blue colors"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "eco",
    "audio_urls": ["https://example.com/track1.mp3"]
  }'

# Track 2 (same style)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a circular visualizer for this track, same purple and blue style as track1"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "eco",
    "audio_urls": ["https://example.com/track2.mp3"]
  }'

错误处理

错误原因解决方案
Failed to create prediction: HTTP 422余额不足在 eachlabs.ai 充值
音频处理失败格式不受支持或文件已损坏使用 MP3/WAV,检查文件完整性
超时音频过长或可视化效果过于复杂将客户端超时设置为至少 10 分钟
同步问题节拍检测过于复杂提供清晰且母带处理良好的音频

相关技能

  • each-sense - 核心 API 文档
  • music-generation - AI 音乐创作
  • video-generation - 通用视频创作
  • video-editing - 后期制作剪辑

评论

支持 Markdown