edit-dialogue
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFix spoken words
修正口述词语
Delivers one MP4 where only the agreed words change. Everything else keeps the original picture and voice.
If no sync. tools are available, follow references/connect.md first. The REST version of this workflow is in early access and needs features enabled per organization; see https://sync.so/docs/developer-guides/dialogue-editing.
仅输出一个 MP4,其中只有约定的词语发生变化。其余所有内容都保留原始画面和声音。
如果没有可用的 sync. 工具,请先按照 references/connect.md 操作。此工作流的 REST 版本处于早期访问阶段,需要按组织启用相关功能;请参阅 https://sync.so/docs/developer-guides/dialogue-editing。
Inputs
输入
- Video: one person speaking, up to 10 minutes, as a local file, public URL or sync. video asset ID.
- The fix: which words to change or remove, and what to say instead. Never guess the replacement words.
- 视频: 一个人讲话的视频,时长不超过 10 分钟,可以是本地文件、公共 URL 或 sync. video asset ID。
- 修改内容: 指定要更改或移除哪些词语,以及要改成什么。绝不猜测替换词语。
Tools
工具
| Step | Tool |
|---|---|
| Check support | |
| Create the project | |
| Save the video | |
| Transcribe | |
| Preview the new audio | |
| Quote | |
| Create | |
| Wait | |
| Many variants | |
| 步骤 | 工具 |
|---|---|
| 检查支持情况 | |
| 创建项目 | |
| 保存视频 | |
| 转录 | |
| 预览新音频 | |
| 询价 | |
| 创建 | |
| 等待 | |
| 多种变体 | |
Steps
步骤
-
Support. Call. If Edit Dialogue isn't available for this account, say so and stop. Note whether it reports
dialogue_get-options.keyedPreview -
Project. Callwith a new random UUID as
projects_create, a shortidandname. Save the returneddefaultWorkflow: "edit_dialogue"asid. Pass it wherever a tool asks forprojectId, and addprojectIdonly on tools that take that field.projectIntent: "explicit" -
Save the video into that project. Follow references/media-input.md.
-
Transcribe. Callwith the
dialogue-transcriptions_createandprojectId, thenvideoAssetIdwith the returneddialogue-transcriptions_getuntil it completes. If the result includes a newid, the video was copied into sync. storage: use that ID from here on. If more than one speaker is detected, explain that this workflow handles one speaker, and stop.videoAssetId -
Agree the edits. Show the transcript lines around the fix. Turn the request into edits that use the transcript's word IDs:
- , adding
{"kind": "change", "wordId": "w35", "replacement": "Mia"}only for a name the voice might say wrong. Write respellings as plain words, without hyphens or capitals, which the voice may spell out."pronunciation": "meeah" - for consecutive words.
{"kind": "remove", "wordIds": ["w12", "w13"]}
Confirm the edits with the user. -
Preview. The preview clones the speaker's voice and can incur synthesis charges, so mention that when you confirm the edits. Callwith the edits and the
dialogue-previews_create, plus a newtranscriptionJobIdsaved before the call whenidempotencyKeyis reported. If that call's outcome is unclear, retry only the identical request with the same key. PollkeyedPreviewuntil it completes, and share the preview audio. If some edits failed (a partial completion), for example because a replacement is too long for the gap it fills, say which, suggest shorter wording, confirm the revised edits, and make a new preview withdialogue-previews_get.previousPreviewId -
Quote. Callwith the completed preview's ID as
dialogue-videos_estimateanddialogueEditId. Show the estimate and wait for approval of both the preview and the cost.model: "sync-3" -
Create. Callonce with the same
dialogue-videos_create, the model, the project and a newdialogueEditId. If the response is lost, retry once with the same key and inputs.idempotencyKey -
Wait and deliver. Pollwith the returned
generations_getandiduntil it's final. Give the exactwait: trueunchanged.outputMediaUrl
-
支持情况。 调用。如果该账户无法使用 Edit Dialogue,请说明并停止操作。记录其是否报告
dialogue_get-options。keyedPreview -
项目。 调用,传入一个新的随机 UUID 作为
projects_create、一个简短的id,以及name。将返回的defaultWorkflow: "edit_dialogue"保存为id。每当工具要求projectId时都传入该值,并且仅在工具包含相应字段时添加projectId。projectIntent: "explicit" -
保存视频到该项目中。按照 references/media-input.md 操作。
-
转录。 使用和
projectId调用videoAssetId,然后使用返回的dialogue-transcriptions_create调用id,直至完成。如果结果包含新的dialogue-transcriptions_get,说明视频已复制到 sync. storage:从此处开始使用该 ID。如果检测到多个说话者,请说明此工作流仅处理一个说话者,然后停止操作。videoAssetId -
确认修改内容。 展示修改位置附近的转录文本。将请求转换为使用转录文本中 word ID 的修改项:
- ;仅当名字可能被读错时,才添加
{"kind": "change", "wordId": "w35", "replacement": "Mia"}。将拼写重述写成普通单词,不使用连字符或大写字母,因为声音可能会逐字母拼读。"pronunciation": "meeah" - ,用于移除连续的词语。
{"kind": "remove", "wordIds": ["w12", "w13"]}
与用户确认修改内容。 -
预览。 预览会克隆说话者的声音,并可能产生合成费用,因此在确认修改内容时应提及这一点。调用,传入修改项和
dialogue-previews_create;如果报告了transcriptionJobId,还应在调用前保存一个新的keyedPreview。如果调用结果不明确,只能使用相同的键重试完全相同的请求。轮询idempotencyKey直至完成,并分享预览音频。如果部分修改失败,例如替换内容对于要填补的间隙过长,请说明失败的修改项,建议使用更短的措辞,确认修改后的内容,并使用dialogue-previews_get创建一个新预览。previousPreviewId -
询价。 调用,将已完成预览的 ID 作为
dialogue-videos_estimate,并设置dialogueEditId。展示预估结果,并等待用户同时批准预览和费用。model: "sync-3" -
创建。 调用一次,使用相同的
dialogue-videos_create、模型、项目和新的dialogueEditId。如果响应丢失,使用相同的键和输入重试一次。idempotencyKey -
等待并交付。 使用返回的调用
id,并设置generations_get,直至任务进入最终状态。原样提供准确的wait: true。outputMediaUrl
Many variants
多种变体
To make many versions of one recording, such as one per recipient's name, transcribe once (steps 1 to 4), then:
- Agree every variant's edits as in step 5, as a table with one row per variant, and confirm them once, mentioning the synthesis charges.
- Previews. With listed, save a new UUID for the set, then call it with
jobs_create-many, that UUID astool: "dialogue-previews_create", and one item per variant: theidempotencyKeywithprojectId, theprojectIntent: "explicit", thevideoAssetIdand that variant'stranscriptionJobId. Leaveeditsout of the items: the tool derives one per item when the account reportsidempotencyKey. WithoutkeyedPreview, never resend a preview set after an unclear response; tell the user instead. Preview requests are limited to 30 a minute, so send at most 30 variants per call and wait a minute before the next. Follow them withkeyedPreviewandjobs_get-many, and handle partial completions as in step 6. Withoutwait: true, make the previews one at a time as in step 6, at the same pace.jobs_create-many - Quote once. Call for each completed preview, show the count and the total, and wait for one approval of the whole set.
dialogue-videos_estimate - Renders. Write one per variant into your variant table, plus a new UUID for the set, before calling. Then call
idempotencyKeywithjobs_create-many, that UUID astool: "dialogue-videos_create", and one item per approved preview:idempotencyKeywithprojectId,projectIntent: "explicit", the preview's ID asvideoAssetId,dialogueEditIdand the variant'smodel: "sync-3". Send at most 50 per call. Follow them withidempotencyKeyandjobs_get-many. When the response haswait: true, send it again exactly as returned once running jobs finish; if the tool refuses a single remaining item, send that variant withremainingand the same key. Withoutdialogue-videos_create, calljobs_create-manyonce per preview with its own key, keeping at most the plan'sdialogue-videos_createfromgenerationLimits.concurrencyin flight.account_get-context - Deliver a table of variant, status and exact .
outputMediaUrl
要基于一次录制生成多个版本,例如为每位收件人的姓名生成一个版本,请先转录一次(步骤 1 至 4),然后:
- 按照步骤 5 的方式确认每个变体的修改内容,整理成每个变体一行的表格,并一次性确认,同时提及合成费用。
- 预览。 如果工具列表中有 ,请先为这组预览保存一个新的 UUID,然后调用该工具,传入
jobs_create-many、该 UUID 作为tool: "dialogue-previews_create",以及每个变体对应的一项:idempotencyKey和projectId、projectIntent: "explicit"、videoAssetId以及该变体的transcriptionJobId。不要在各项目中包含edits:当账户报告idempotencyKey时,工具会为每个项目自行推导一个键。如果没有keyedPreview,在响应不明确后绝不要重新发送这组预览,而应告知用户。预览请求限制为每分钟 30 个,因此每次调用最多发送 30 个变体,并在下一次调用前等待一分钟。随后调用keyedPreview并设置jobs_get-many,按照步骤 6 的方式处理部分完成的情况。如果没有wait: true,则按照步骤 6 的方式逐个创建预览,并保持相同的请求频率。jobs_create-many - 统一询价。 对每个已完成的预览调用 ,展示变体数量和总费用,并等待用户一次性批准整组任务。
dialogue-videos_estimate - 渲染。 调用前,在变体表格中为每个变体写入一个 ,并为这组任务保存一个新的 UUID。然后调用
idempotencyKey,传入jobs_create-many、该 UUID 作为tool: "dialogue-videos_create",以及每个已批准预览对应的一项:idempotencyKey和projectId、projectIntent: "explicit"、预览的 ID 作为videoAssetId、dialogueEditId以及该变体的model: "sync-3"。每次调用最多发送 50 个。随后调用idempotencyKey并设置jobs_get-many。当响应中包含wait: true时,在正在运行的任务完成后,按照返回内容原样再次发送;如果工具拒绝处理单个剩余项目,则使用remaining和相同的键发送该变体。如果没有dialogue-videos_create,则对每个预览调用一次jobs_create-many,并为每次调用使用各自的键,同时确保正在执行的任务数量不超过dialogue-videos_create返回的方案account_get-context。generationLimits.concurrency - 交付包含变体、状态和准确 的表格。
outputMediaUrl
Limits
限制
- One speaker per video, up to 10 minutes, and at most 100 edits per preview.
- Targeted words only. For a whole new script, explain that this workflow keeps the original recording, and offer the lipsync skill with a script and a chosen voice instead. Never split a new script into many word edits to get around this.
- The speaker's voice is cloned for the new words. Assume the user has the rights to their own media, and don't ask about consent on routine requests. Decline only when the request is to make a real, identifiable person, such as a politician or celebrity, appear to say something they didn't say, in order to deceive.
- 每个视频只能有一个说话者,时长不超过 10 分钟,每个预览最多包含 100 项修改。
- 仅支持针对性修改词语。如果需要使用完整的新脚本,请说明此工作流会保留原始录制内容,并改为提供带有脚本和所选声音的 lipsync skill。绝不要将新脚本拆分成大量词语修改来规避此限制。
- 新词语会使用说话者的克隆声音。默认用户拥有其媒体的相关权利,对于常规请求不要询问授权。只有当请求要求让一位真实且可识别的公众人物(如政治家或名人)看似说过其实际未曾说过的话,并且意图进行欺骗时,才应拒绝该请求。