SuperAPI AI 工具集

add-sfx

设计与创作

查看项目

更新于 10-15 21:09

技能介绍

用途:为 @remotion/sfx 添加新音效,属于 Remotion 项目内部的音效接入流程。

前置条件:音效必须先加入 remotion.media 包,其源头是仓库中的 generate.ts;音效须为 WAV 格式、CC0 许可、峰值归一化到 -3dB。

主要步骤:1) 在 remotion-dev/remotion.media 仓库根目录添加 WAV,并在 generate.ts 的 soundEffects 数组添加 fileName 与 attribution 条目,运行 bun generate.ts 生成 files/ 与 variants.json 后部署;2) 在 packages/sfx/src/index.ts 添加 camelCase 导出,避免保留字(如用 uiSwitch 而非 switch);3) 在 packages/docs/docs/sfx/<name>.mdx 新建文档页,包含 frontmatter、AvailableFrom、PlayButton、描述、示例代码、Value、Duration、Attribution、Convert 与 See also;4) 在 packages/docs/sidebars.ts 与 table-of-contents.tsx 注册;5) 运行 bun packages/docs/generate-sfx-waveforms.ts 重新生成波形;6) 更新 packages/skills/skills/remotion/rules/sfx.md;7) 在 packages/sfx 运行 bun run make 构建。

命名:文件名 my-sound.wav 对应导出 mySound,switch.wav 对应 uiSwitch,page-turn.wav 对应 pageTurn。版本取 packages/core/src/version.ts,文档 AvailableFrom 的补丁版本加 1。

限制:资料未提供该技能在非 Remotion 仓库环境下的独立使用方式、收费或平台信息。