layer-audio
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLayer Audio Generation
Layer 音频生成
Overview
概述
Three distinct use cases with almost nothing in common: , , and
. Pick one, then write the prompt the way that discipline expects. The loop and the
spend gate are in the skill.
sound_effectsmusictext_to_speechlayerIf a sibling skill named here is missing from your available skills, ask the user to install it
(); unattended, proceed from tool schemas and flag the
gap.
npx skills add layerai/skills --skill <name>三个几乎毫无关联的独立使用场景:、 和
。先选择一个,再按照该创作领域惯用的方式编写提示词。 和
位于 skill 中。
sound_effectsmusictext_to_speechloopspend gatelayer如果此处提到的同级 skill 不在可用 skills 中,请要求用户安装
();无人值守时,则根据 tool schemas 继续处理,并
标记这一缺失。
npx skills add layerai/skills --skill <name>Sound effects
音效
Describe the physical event, not the feeling. What object, made of what, doing what, at what scale,
in what space. "Heavy oak door, iron hinges, swinging open slowly with a low groan, then a dull thud
against stone" is a sound. "Scary door sound" is a mood board.
Three things decide whether a game-ready effect is usable:
- The space. Generated effects arrive with room ambience baked in unless you exclude it. For an asset the engine will place in its own reverb, ask for it dry, close-mic'd, and isolated. A wet effect cannot be made dry afterwards.
- The length. UI sounds are short, and a model given no length target produces a tail that has to be trimmed. State it.
- One event per generation. A footstep, a sword unsheathe, and an impact are three assets. Asking for a sequence yields one file you then have to cut apart.
For UI sound sets, generate each state separately and name the shared character once in every prompt,
so the confirm, cancel, and hover sounds read as one family.
描述物理事件,而不是感受。是什么物体、由什么材质制成、正在做什么、规模多大,
以及处于什么空间。“厚重的橡木门,配铁铰链,缓慢推开时发出低沉呻吟,随后撞上石头,
发出一声闷响”是在描述声音。“吓人的门声”则只是 mood board。
决定音效是否适合用于游戏的主要有三个因素:
- 空间。 除非明确排除,否则生成音效时会直接混入房间环境声。对于要由游戏引擎放入 自身混响环境中的素材,要求生成 dry、close-mic'd、isolated 版本。音效一旦带有混响(wet), 之后就无法再变成干声(dry)。
- 长度。 UI 音效都很短;如果不给模型指定目标长度,生成的音频会带有一段需要裁剪的 尾音。应明确说明长度。
- 每次生成一个事件。 一次脚步、一次剑刃出鞘和一次撞击是三个独立素材。要求生成一连串 事件,只会得到一个文件,之后还需要把它切开。
对于 UI 音效集,应分别生成每种状态,并在每个提示词中各写一次共有的声音特征,
使 confirm、cancel 和 hover 音效听上去属于同一家族。
Music
音乐
Name genre, instrumentation, tempo, mood, and function. Function is the one people leave out and
the one that matters most: a menu loop, a combat layer, a boss intro, and a credits piece are written
differently even in the same style.
Say what the track should not do. Background music for a game should not have an arresting melodic
hook competing with dialogue, and stating "sparse, no lead melody, sits under voice" gets there
faster than three rerolls.
Where a model exposes structured fields (, , ), use them instead of
describing the same thing in prose. is the authority on which apply. For anything
that must loop, keep the arrangement steady rather than building to a climax that cannot rejoin its
own start.
lyricsinstrumentalspeedget_base_model明确写出流派、配器、速度、情绪和功能。功能是大多数人最容易漏掉、也最重要的信息:
菜单循环、战斗叠层、Boss 登场段和片尾曲,即使风格相同,编写方式也不同。
说明曲目不应做什么。游戏背景音乐不应带有与对话争夺注意力的醒目旋律 hook;
写明“稀疏、无主旋律、位于人声之下”,比连续重新生成三次更快达到目标。
如果模型提供结构化字段(、、),应直接使用这些字段,
而不要用文字重复描述同样的信息。哪些字段可用,以 的结果为准。
对于必须循环播放的音频,应保持编排稳定,不要不断推向无法接回起点的高潮。
lyricsinstrumentalspeedget_base_modelSpeech
语音
Filter for . Send the script clean, with real punctuation, since models take commas
and full stops as pacing. Spell out anything ambiguous: a number, an acronym, or an invented fantasy
name will otherwise be read the model's way, and "Aelthyr" needs a phonetic respelling if it must be
said consistently across a cast.
text_to_speechDirect the delivery separately from the words: pace, energy, age, accent, emotional register. Keep
one voice per character and reuse the same voice selection across the project, since a voice that
drifts between lines is more noticeable than one that is merely wrong.
Generate long narration in paragraph-sized chunks rather than one call. A single bad word in a
four-minute take costs the whole take.
筛选 模型。脚本内容要干净,并使用规范标点,因为模型会根据逗号和句号
控制节奏。明确写出任何有歧义的内容:数字、缩写或自创的奇幻名字,否则模型会按自己的
理解朗读;如果某个名字需要由一组角色一致读出,Aelthyr 就要附上语音拼写。
text_to_speech将表达方式与台词分开指导:语速、活力、年龄、口音和情绪基调。每个角色固定使用同一个
声音,并在整个项目中复用相同的声音选择,因为声音在不同台词之间发生漂移,比声音本身
不合适更容易被察觉。
长篇旁白应按段落大小分块生成,而不是一次调用完成。四分钟录制中只要有一个词读错,
整段就毁了。
Worked example
实操示例
"We need a sword-unsheathe effect for the inventory screen."
- with
list_base_models. Take the first result, thenfilter.use_case: "sound_effects"for its length and format fields.get_base_model - Prompt the event: "Single steel longsword drawn from a leather scabbard, fast, bright metallic ring with a short decay. Dry, close-mic'd, isolated, no room reverb, no ambience, no music. Under one second."
- , then execute with
estimate_forge_pricehigh enough to choose from, since audio runs are cheap and the take-to-take variation is large.batch_size - Poll at , then audition the results before delivering rather than passing on the first file.
poll_interval_seconds
“我们需要为库存界面生成一个剑刃出鞘音效。”
- 使用 调用
filter.use_case: "sound_effects"。取第一个结果,再调用list_base_models获取其长度和格式字段。get_base_model - 描述事件:“单把钢制长剑从皮革剑鞘中快速拔出,声音明亮,带有清脆金属声,衰减短促。 dry、close-mic'd、isolated,不要房间混响、环境声或音乐。短于一秒。”
- 调用 ,然后以足够高的
estimate_forge_price执行,以便有多个结果可供挑选; 音频生成成本低,而不同次生成之间的差异很大。batch_size - 按 轮询,然后试听结果再交付,不要直接采用第一个文件。
poll_interval_seconds
Common mistakes
常见错误
- Describing the emotion of a sound instead of the physical event.
- Accepting baked-in reverb on an asset the engine will place in its own space.
- Asking for a sequence of events in one generation, then cutting the file apart by hand.
- Leaving length unstated on a UI sound.
- Omitting the function of a music cue, so a background loop arrives with a lead melody.
- Sending an unpunctuated script, or an invented name with no phonetic spelling.
- Generating four minutes of narration in one call.
- 用声音的情绪而非物理事件来描述。
- 对于引擎会放入自身空间中的素材,却接受了已经烘焙进素材的混响。
- 一次生成要求一连串事件,再手工切开文件。
- 未说明 UI 音效的长度。
- 遗漏音乐 cue 的功能,导致背景循环出现主旋律。
- 发送没有标点的脚本,或发送未注明发音的虚构名字。
- 一次调用生成四分钟旁白。