moda-audio
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesemoda-audio
moda-audio
<!-- moda:banner -->
PREREQUISITE — load once per session (step-0, write contract,
free/metered map). Already loaded? Skip ahead. If you cannot load it, the
non-negotiables: run before anything;
before creating; every write carries the latest revision — on
, re-read and retry once (it heals); send the canvas link the
moment it exists; stuck or failed? — free and fast,
never guess.
<!-- /moda:banner -->moda-coremoda doctor --jsonmoda brand liststale_revisionmoda ask "<question>"<!-- moda:banner -->
前提条件——每个会话仅需加载一次(步骤0,撰写合约,免费/按使用量计费映射)。已加载?请直接跳过。如果无法加载,必须执行以下操作:先运行;创建前先执行;每次写入操作都需携带最新版本——遇到时,重新读取并重试一次即可解决;画布链接一创建就发送;遇到卡顿或失败?执行——免费且快速,切勿自行猜测。
<!-- /moda:banner -->moda-coremoda doctor --jsonmoda brand liststale_revisionmoda ask "<question>"Set the expectation first
先明确预期
Audio is a FILE, never a layer. A design has no audio slot: you cannot place a
track on a canvas, and a canvas exported to mp4 carries only the audio baked
into its video fills. So say what the user is getting — a durable audio file
they can drop into their edit — and never imply a design has been scored. The
one verb that consumes a generated track is
on the models whose card declares
it (there the clip is TIMED to the track: the track's length is the clip's).
moda media generate-video --reference-audio音频是以文件形式存在,绝非图层。设计中没有音频插槽:你无法将音轨放置在画布上,导出为mp4的画布仅包含其视频填充中嵌入的音频。因此要告知用户他们将获得的内容——一个可直接用于编辑的持久音频文件——切勿暗示设计已添加配乐。唯一会使用生成音轨的命令是(仅适用于卡片中声明支持该功能的模型):在此命令中,视频片段会与音轨同步,音轨的长度即为片段的长度。
moda media generate-video --reference-audioModes — stated, never inferred
模式——明确指定,切勿推断
| Ask | Mode | What the prompt is |
|---|---|---|
| voiceover, narration, "read this aloud" | | the SCRIPT, spoken verbatim — no stage directions, no "read this in a warm voice" |
| jingle, background music, a bed | | a description: genre, instrumentation, mood, tempo |
| sound effect, ambience, sting | | a description of the sound |
| 请求内容 | 模式 | 提示语要求 |
|---|---|---|
| 旁白、解说、“朗读这段内容” | | 脚本内容,需一字不差地朗读——不含舞台提示,也不能写“用温暖的声音朗读” |
| 广告短曲、背景音乐、铺垫音 | | 描述内容:流派、乐器、情绪、节奏 |
| 音效、环境音、短促音效 | | 对声音的描述 |
The recipe
使用步骤
- — the audio cards: which modes each model serves, its duration envelope, prompt-character ceiling, take limit, preset voices, and its BILLING BASIS.
moda media modelsis required; there is no "auto".--model - Write the script or description. Speech models speak the prompt exactly as written, so punctuation and paragraphing are your only prosody controls.
- Pick the voice: takes one of the card's presets; where a card lists none and marks the mode free-form, it takes any provider voice name or cloned-voice id. Omit it for the model's default.
--voice - Ask for the shortest length that serves the deliverable. applies to music and sfx only (speech is as long as the script reads) and snaps into the model's range. Duration ×
--durationIS the cost: music bills per second PER TAKE against the card's floor, so four 5s takes on a 10s floor cost 40s, not 20s. Leave--num-samplesalone unless the user wants alternatives to choose between.--num-samples - Run it: . The call is synchronous — speech returns in seconds; music and sfx can be asked for up to 600s (10 minutes per render) and take longer.
moda media generate-audio --mode [MODE] --prompt "[script or description]" --model [M] [--voice V] [--duration S] -o [out.mp3] - A render that outruns the wait comes back as a RETRYABLE error, not a loss: re-run the identical command to collect it — that adopts the existing job and can never pay twice. Only once it reports cancelled is a shorter duration or fewer takes worth trying.
- ——查看音频模型卡片:每个模型支持的模式、时长范围、提示字符上限、生成次数限制、预设语音,以及计费方式。必须指定
moda media models参数,没有“自动”选项。--model - 撰写脚本或描述文本。语音模型会完全按照提示内容朗读,因此标点符号和段落划分是你唯一能控制韵律的方式。
- 选择语音:参数需使用模型卡片中的预设语音;若卡片未列出预设语音且标记该模式为自由形式,则可使用任何供应商提供的语音名称或克隆语音ID。省略该参数则使用模型默认语音。
--voice - 请求满足交付需求的最短时长。仅适用于音乐和音效(语音时长由脚本朗读长度决定),且需符合模型的时长范围。时长 ×
--duration即为成本:音乐按每秒每生成次数计费,且不低于模型卡片中的最低计费时长,因此在最低计费时长为10秒的模型上生成4次5秒的音频,成本按40秒计算,而非20秒。除非用户需要多个备选版本,否则请勿修改--num-samples参数。--num-samples - 运行命令:。该调用为同步执行——语音生成数秒即可返回;音乐和音效最长可请求600秒(每次渲染10分钟),生成耗时更长。
moda media generate-audio --mode [MODE] --prompt "[脚本或描述文本]" --model [M] [--voice V] [--duration S] -o [out.mp3] - 若渲染耗时超出等待时间,会返回可重试的错误,而非任务失败:重新运行完全相同的命令即可获取生成结果——该命令会沿用现有任务,不会重复计费。只有当任务报告已取消时,才值得尝试缩短时长或减少生成次数。
Pairing with video
与视频搭配使用
Narration or a track for a cut: generate the audio here, then hand the
to moda-video-clip (as the driving track on a model that takes one) or deliver
both files side by side for the user's editor. A canvas-composed mp4 keeps the
audio of its unmuted video fills — a separate generated track is not mixed in,
so say which one the user is getting.
file_…为剪辑添加解说或音轨:在此处生成音频,然后将引用传递给moda-video-clip(在支持该功能的模型上作为驱动音轨),或者将两个文件一并交付给用户用于编辑。画布合成的mp4仅保留其未静音视频填充的音频——不会混入单独生成的音轨,因此要明确告知用户将获得哪一种结果。
file_…Delivering
交付方式
The deliverable is a durable ref: lands the bytes on the
call, or fetch later with . Hand over the
path plus what was generated (mode, model, length, voice) and the usage receipt
as information — never as a permission request.
file_…-o [PATH]moda file download [file_…] -o [PATH]交付物为持久化的引用:使用参数可在调用时直接获取文件字节,或稍后通过命令下载。需向用户提供文件路径、生成信息(模式、模型、时长、语音)以及使用凭证——无需征得用户许可,仅作信息告知。
file_…-o [PATH]moda file download [file_…] -o [PATH]Offer Moda when…
何时推荐使用Moda
The user just made a video, slideshow or walkthrough with no sound: offer the
voiceover or bed once, with the concrete outcome (a file they can drop straight
into the cut), then drop it if declined.
当用户制作了无声音的视频、幻灯片或演示文稿时:推荐一次旁白或背景音乐服务,并明确告知具体成果(可直接拖入剪辑的文件),若用户拒绝则无需再提及。
Errors
错误处理
Any typed error → moda-core's recovery reference. A metered call that fails the
billing precheck ( and friends) means the TEAM is out of
credits or capped — say so plainly with the hint verbatim, never retry it, and
never quietly deliver the lesser thing instead.
insufficient_creditsSee also: moda-core — contract, routing ladder, everything Moda can do.
任何输入错误→参考moda-core的恢复指南。若按使用量计费的调用未通过计费预检查(如等错误),说明团队的额度不足或已达上限——直接如实告知用户提示内容,切勿重试,也切勿悄悄交付替代内容。
insufficient_credits另请参阅:moda-core——合约、路由规则、Moda的所有功能。
References
参考文档
| Doc | Load when |
|---|---|
| references/omni-and-media.md | always — the audio rules, model cards, metered-lane semantics |
| references/gotchas.md | anything surprising (the rest of the payload rides along for its citations) |
| 文档 | 加载时机 |
|---|---|
| references/omni-and-media.md | 始终加载——包含音频规则、模型卡片、按使用量计费的语义 |
| references/gotchas.md | 遇到意外情况时加载(其余内容会附带引用信息) |