Repository navigation
[feat] audio: add Volcengine Ark Seed Audio 1.5 text-to-audio adapter - #661
Zhangbo-cn wants to merge 74 commits into
Conversation
db589e1 to
298c740
Compare
david6666666
left a comment
There was a problem hiding this comment.
Dot,代表 @david6666666,非表决 COMMENT。
把首版限定在 text-to-audio、把不支持的接口和引用留在 #650,范围清楚。我核对了 Ark 请求、job snapshot 和 content.audios 的返回路径,也打开了 composer、结果与双语截图。截图能说明入口和波形出现,不能验收声音;证据目录目前只有图片,没有找到作者实跑的可播放音频或生成到采纳的录像。原文也明确实际只测了 MP3 / 44.1 kHz,WAV 和其他采样率不能只凭 schema 测试算成已验证。建议先补当前 head 的短音频和回执,未测选项先收窄。Release checks 仍在运行。
当前证据暂定 45/100,非批准分:范围 3/3、正确性 2/3、验证 2/3、主张证据 0/3(缺必需的可播放产物)、简洁度 0/3(新增解释性源码注释,按 rubric 硬零)。我没有调用付费 provider。
| # adapter release, with the provider's own prosody controls. | ||
| rules.update(profile='seed-audio', allowedKinds=[], maxImages=0, referencesAllowed=False, | ||
| maxPromptCharacters=10000, audioTasks=['text2audio'], | ||
| outputFormats=['mp3', 'wav'], sampleRates=[8000, 16000, 24000, 32000, 44100, 48000]) |
There was a problem hiding this comment.
这里会对外公布 wav 和六档采样率,但 PR 的实际 provider 证据只有 MP3 / 44.1 kHz。pydantic 接受这些输入,不代表服务会按这些规格返回。建议发布时先只暴露实测组合;若要保留其他选项,请在同一 head 回执里用实际下载字节核对格式和采样率。
298c740 to
8c42994
Compare
david6666666
left a comment
There was a problem hiding this comment.
REQUEST CHANGES 8c42994 Refs #650
Dot,代表 @david6666666,非表决 COMMENT。
这版新增图片和样音参考。我下载了两段生成 MP3,完整解码为 44.1 kHz 双声道(3.03 秒和 1.75 秒),字节数和 SHA-256 都与对应 JSON 一致。图片场景的 JSON 有一处对不上:外层 job 是 3ef1954b、参考是图片,但 asset.provenance 指向样音场景的 8a8deb75 和 audio source。请从该任务的实际项目记录重新导出证据,绑定 head、job、源素材与输出;目前不能用它证明图片来源可追溯。也还没找到能打开的从生成、采用到重开的流程录像。
另一个代码问题见 inline:MP3 样音通过本地校验,却被封装成作者实测会被 Ark 拒绝的 audio/mpeg。建议先修 transport,并把正文中互相矛盾的参考素材范围说明同步。探针已补 WAV / 44.1 kHz 的作者报告,不再当作从未测过;这不证明其余采样率。当前 Release 仍在跑,我未调用真实 provider。
当前证据暂定 40/100,非批准分:范围 2/3(范围说明打架)、正确性 2/3(MP3 参考链路明确失败)、验证 2/3(WAV fixture 有,MP3 regression 缺)、主张证据 0/3(流程证据、源产物绑定不全)、简洁度 0/3(新增解释性源码注释,规则硬零)。
| total_ms += duration | ||
| if len(result['audios']) >= rules['maxAudios'] or total_ms > SEED_AUDIO_REFERENCE_TOTAL_MS: | ||
| raise ProjectError(f'参考音频最多 {rules["maxAudios"]} 段、合计不超过 {SEED_AUDIO_REFERENCE_TOTAL_MS // 1000} 秒。', 422, code='audio_reference_count') | ||
| result['audios'].append(data_uri(data, 'audio/wav' if meta['type'] == 'audio/x-wav' else meta['type'])) |
There was a problem hiding this comment.
这里接受项目里标成 audio/mpeg 的 MP3,但只归一化了 WAV。结果普通 MP3 样音能过本地校验,提交时却发 data:audio/mpeg;base64,…;本 PR 的 live probe 已确认 Ark 拒绝它,只认 audio/mp3 或 audio/wav。建议只在 Ark 传输层把 MP3 映射成 audio/mp3,保留项目资产 MIME;再加一条用实际 MP3 fixture 检查最终 request URI 的 regression。
## summary
- Add a `seed-audio` input-rules profile, selected by `protocol=volcengine`
plus the `doubao-seed-audio-1-5` model prefix, that publishes
`audioTasks=['text2audio']`, `outputFormats`, `sampleRates` and
`referencesAllowed=False` instead of guessing capabilities from a name.
- Build the request in `integrations/seed_audio.py`: `/api/v3/contents/
generations`, `content[{type:text}]`, `output_format`, and an `audio_config`
carrying only the prosody offsets the caller actually set. Artifacts are
read from `content.audios[].url`.
- Refuse the Agent Plan base URL with `seed_audio_base_url`; the two bases do
not accept the same key, and the plan endpoint answers 404 `UnsupportedModel`.
- Carry `taskType`, `speechRate`, `loudnessRate`, `pitchRate`, `outputFormat`
and `sampleRate` through `AudioParameters`, `AudioExecution` and the
generation fingerprint so a replay reproduces the accepted request.
- Give the profile a one-hour execution budget, because a single synchronous
call can legitimately take minutes for long scripts.
- Add the `ark-content` provider preset (`/api/v3`) and let data rather than
model names decide whether the composer offers 全能配音: a profile with
`audioTasks` no longer renders the text-reading option, the voice field, or
the read-only label.
- Let the base URL choose the preset: two Ark presets now share one protocol
and media kind, so `providerPresetFor` prefers the preset whose URL matches
the connection and only falls back to the first match. Without this the Seed
Audio connection was labelled "Volcano Ark / Agent Plan" in settings.
- Accept the two reference shapes the service really takes: one image or up to
six voice samples, never both. `image_url` and `audio_url` are exclusive at
the provider, so the reference path rejects a mix, enforces 15 MB and 2–30 s
per sample (180 s total), and still refuses video with a stable code.
- Stop treating every audio model as reading-only: a profile that allows
references no longer reports the reference as unused in the composer.
- Cover the adapter with rule, request-shape, response-parsing, reference,
validation and end-to-end job tests, and pin the profile/contract agreement
so the sample rates cannot drift apart.
## verification
- Live probe in `docs/development/seed-audio-1-5-probe.md` keeps the measured
matrix: every published `output_format` and `sample_rate` was requested once,
downloaded, and probed with `ffprobe` (mp3 at 8000/16000/24000/32000/48000,
default 44100, wav 44100 as `pcm_s16le`), with the byte counts and response
echo recorded.
## evidence
- Live probe recorded in `docs/development/seed-audio-1-5-probe.md`: inline
audio references only, video references rejected, synchronous response.
- Real run through the command path: 161214-byte mp3, 8.72 s, 44100 Hz stereo.
- `3516 passed, 131 skipped` on `d083cbc1`; `npm test` 1110 passed with the
one env-only failure that also fails on `main`; build and `check:i18n` clean.
- Browser: generate, adopt (`adoptionPolicy=if_current`), reopen with the audio
intact, and the wrong-base refusal rendered in both locales.
## scope
Text to audio plus one-image and voice-sample references. Separation,
multi-artifact results, dubbing, translation, subtitles and custom voices stay
out: every one of them needs a video or voice transport that the provider does
not expose to this key. `video_url` accepts only `http(s)://` and `tos://`, and
the Files API offers `user_data`, `agent` and `voice` purposes, so a project
video cannot reach the service without a TOS bucket or a public URL.
… media Ark accepts only `http(s)://` and `tos://` for `video_url`, and a bare `tos://` key is refused with `AccessDenied` unless the account grants it service access. A presigned URL keeps the object private and still lets the service read it, so dubbing, translation and subtitle work can send a project video without publishing it. TOS4 signing is implemented with the standard library, so the container gains no dependency for what is a few HMAC rounds. Verified against the live bucket: a 68378-byte upload returned 200, the presigned URL served the same bytes, and Ark accepted it for `role=dubbing_video` with `target_language=zh`, returning a dubbed video, an extracted audio track and one SRT subtitle. Refs ThinkFlowLab#650
A dubbing request carries a `dubbing_video` and a language pair instead of a prompt, and comes back with three artifacts: the dubbed video, the extracted speech track and an SRT. The service refuses text in that scene, requires `dubbing_config`, and only accepts a video between 4 s and 6 min. The video is uploaded to the configured bucket and sent as a presigned URL, so a project video never has to be published. A missing storage configuration fails before submission with `seed_audio_storage` rather than after a wasted call. Verified against the live service: a 6 s clip with a speech track, uploaded to the bucket and presigned, returned `video_url`, one `audios` entry and one `subtitles` entry with `usage.duration_ms` 6016. Refs ThinkFlowLab#650
a947130 to
b4586aa
Compare
…age pair A dubbing request without a subtitle makes the service listen to the video. With one, the supplied lines win, which is what a translated script needs. The SRT is an asset of the project, uploaded through the same presigned channel as the video, so `custom_subtitle` never carries a URL the service cannot read. Validation now refuses a dubbing request without a target language, a language pair outside dubbing, a subtitle outside dubbing, and a subtitle that is not a timed SRT within 2 MB. Refs ThinkFlowLab#650
david6666666
left a comment
There was a problem hiding this comment.
REQUEST CHANGES 7833997 Refs #650
Dot,代表 @david6666666。非表决 COMMENT。
这次已经是 Draft,且比正文声明的 text-to-audio / 图片与样音参考多出一条视频翻配链路。按当前源码,应用层受理后保存的 adapter 参数是 task=dubbing,参考解析和 Ark 分发却检查 taskType;真正提交的视频会过不了翻配分支。已有测试手工给 task 填了 taskType,没有经过实际受理路径。另一个问题是临时 MP4/SRT 上传成功后,只删除本地文件;签名到期不删除 bucket 对象。具体建议见 inline。上轮 MP3 MIME 问题也仍在,不重复挂评论。
旧图像/样音的两段 MP3 已在上轮下载并解码;证据分支未见当前 Draft 的可播放翻配视频、提交到采用/重开的流程录像,旧材料不能证明这条新路径。同一 head 的 Release checks 仍在运行。本轮静态核对;没有调用 Ark 或上传文件。
当前证据暂定 12/100,非批准分:范围 1/3(正文未覆盖新增翻配/对象存储)、正确性 0/3(实际任务参数无法路由)、验证 1/3(有 mock/辅助函数测试,缺真实命令到适配器的回归)、主张证据 0/3(当前功能必需的播放与流程证据未提交)、简洁度 0/3(新增解释性源码注释,量表硬零)。建议先定稿范围;如果保留翻配,优先用真实命令提交的 fixture 验证任务参数、适配分发和产物归属,再补临时对象生命周期与同 SHA 演示。
| def seed_audio_references(store, task, rules, result, overrides): | ||
| """Seed Audio takes one image, one video for dubbing, or voice samples, never a mix.""" | ||
| total_ms = 0 | ||
| dubbing = (task.get('parameters') or {}).get('taskType') == 'dubbing' |
There was a problem hiding this comment.
这里从已受理 job 读的是 adapterParameters,应用层在 creation_generation.py:217 写的是 task,不是 taskType。所以真实的翻配视频不会进入 video and dubbing,Ark 分发也读不到。建议统一 adapter 参数名,并加一条由 generation.submit 一直走到 provider mock 的回归;当前手工构造 taskType 的 fixture 发现不了这个差异。
| code=f"seed_audio_{error.code}") from error | ||
| finally: | ||
| os.unlink(path) | ||
| source = tos_transfer.presign(storage["bucket"], storage["region"], key, |
There was a problem hiding this comment.
这里给上传后的项目视频签 URL,但到期只让 URL 失效,不会删除 bucket 里的 MP4;字幕 PUT 或 Ark 请求失败也会把已上传的对象留下来。建议为 MP4/SRT 定义明确保留期与失败、取消时的清理策略,覆盖视频上传成功但字幕失败的回归。
The dubbing parameters declared `targetLanguage` twice, so only the last declaration reached the generated contract and the adapter snapshot. Refs ThinkFlowLab#650
## summary One generation task can now deliver several files instead of silently keeping only the first: a dubbed video, separated audio tracks, and subtitle sidecars all land in the same project as real, inspectable assets. - `ResultVersion` carries `role`, `variant`, and `track`; `primary` stays the adopted output referenced by `Job.asset`. - Providers may return `GeneratedArtifact` items through an optional `generate_all()`; the single-file `generate()` default keeps existing adapters unchanged. - The adopted output and its siblings register in one commit under their own idempotent handles, so a failure never leaves an output without its siblings, and recovery replays the same commit without duplicates. - Artifact bytes are cached before the index (`artifacts.json`), and an index that cannot be validated is rejected instead of half-applied. - `result.select` rejects sidecars, and `job.status` reports every delivered artifact so users and the agent read the same projection.
## summary The Seed Audio adapter now names every file it produces, so the persistence layer added in the previous commit receives more than a bare `(suffix, bytes)`. `dubbing_artifacts()` and the renamed `audio_artifacts()` answer with `(role, url, suffix, variant, track)` tuples. The suffix comes from the URL the vendor returned, restricted to an allow-list; subtitles are told apart by `<scope>_<suffix>`; audio tracks are counted per `type` so two speakers cannot claim the same identity. Dubbing requests every subtitle the response can carry, so the parsed variants are reachable rather than theoretical. `VolcengineGeneration.generate_all()` collects those siblings through an optional `extra_ready` callback and downloads them itself, which keeps the persistence layer free of URLs. Providers without fan-out keep the single-file path, and the profile adapters that inherit the Volcengine `generate_all()` never reach the callback. ## tests - `python3 -m pytest tests -q -m "not browser"` -> 3552 passed, 133 skipped - `tests/test_seed_audio.py` -> 35 passed, including the multi-track job that adopts the primary audio and stores `speaker:0` beside it - `npx tsc --noEmit` -> no output; `node --test tests/*.test.ts` -> 0 fail; `check:i18n` -> 3828 keys, 0 problems
…feat/seed-audio-artifacts
Separation reads one recording up to six minutes and returns one entry per track, so the reference bound differs from the two-to-thirty-second voice samples a generation request takes. A separation request also carries no subtitle and no speech, loudness or pitch adjustment, which the parameters now refuse instead of forwarding to a service that ignores them. Refs ThinkFlowLab#650
…feat/seed-audio-artifacts
A job that produced several files registered every one of them as a result, so a node's version list showed all of them. A subtitle was listed as a version of the audio node it belonged to even though adopting it fails the media-kind check, which leaves a row the user cannot use. The list now keeps a sibling only when its media kind matches the node. A separated track still appears and can be adopted as that node's audio, which is what the delivered files are for. `result_not_adoptable` also joins the contract message catalog, so the Agent reads the reason in English instead of a Chinese sentence. Refs ThinkFlowLab#650 ## tests - `tests/test_result_artifacts.py` -> 12 passed, including the new version list case that fails without the filter (`Say hello-subtitle-target_srt.srt` is offered) and passes with it - `tests/test_creation_node_versions.py test_creation_crop.py test_creation_image_edits.py test_creation_media_publication.py test_command_version_contract.py` -> 108 passed - `check:i18n` -> 3828 keys, 0 problems
david6666666
left a comment
There was a problem hiding this comment.
这版新增通用多产物登记。最需要先修的是恢复边界:主文件和附加文件分别写,进程中断后可用已有主文件成功登记,但丢掉本应一起保存的字幕或分轨。已在对应代码行留了建议。之前的翻配 dispatch 和对象存储保留期问题也未见解决,不重复贴行内。PR 正文和素材仍主要覆盖旧的文生音频与图片/音频参考;未见当前 head 的翻配、多产物收据和可播放演示。
当前证据暂定 12/100(范围 1,正确性 0,验证 1,主张证据 0,简洁性 0;均满分 3)。Ran: 增量源码、恢复路径与 CI 核对;Release checks 尚未结束。Not run: 真实 Ark/TOS 或本地测试。
Dot,代表 @david6666666;非表决。
| task['phase'] = 'save' | ||
| await asyncio.to_thread(cache.save, suffix, data) | ||
| if extras: | ||
| await asyncio.to_thread(cache.save_artifacts, [ |
There was a problem hiding this comment.
主文件先写成功、附加文件还没保存时,如果进程中断,恢复会命中 cached 并跳过整个保存分支,随后可能把只有主文件的任务标成成功。建议把预期完整产物清单作为提交边界:恢复必须确认整组齐全,缺件则保留可恢复状态。补一条在两次保存之间中断并重开的回归。
`result.select` rejects an audio track or subtitle with a stable `result_not_adoptable` code, but the catalog had no English text for it, so an English interface fell back to the generic status sentence. The code now carries its own English sentence, and a test pins both languages the way the neighbouring contract codes are pinned. The extended `register` docstring from the previous commit is reverted: the contract it described lives in `docs/architecture/unified-project.md` and in the tests. Refs ThinkFlowLab#650 ## tests - `tests/test_localization.py` -> 9 passed - `tests/test_result_artifacts.py tests/test_agent_artifacts.py tests/test_creation_assets.py` -> 65 passed
…feat/seed-audio-artifacts
…tting A subtitle has to reach the service as a fetchable URL, and a desktop install has no public address to offer. Without storage the request now stops with `audio_subtitle_transport` instead of the generic storage message, in both interface languages. Also pins the six-track shape: one primary plus `speaker`, `sfx`, `bgm` and `composite` entries numbered within their own type. Refs ThinkFlowLab#650
## summary Seed Audio 1.5 tells 分轨 and 参考音频 apart by the `role` on each `content[].audio_url`, not by `taskType`. The outbound body hardcoded `reference_audio`, so a separation job was sent as "generate from this audio reference" and the service answered with one re-recording instead of the requested tracks; the canvas then showed one primary clip and the job read as a success. The business intent now picks the role where the request is prepared, and the outbound body only forwards what preparation decided: - `reference_inputs.seed_audio_references` records `separate_audio` for `taskType: separation` and keeps `reference_audio` for every other audio task, on the manifest entry too. - `seed_audio.request_body` takes `audio_role` and no longer hardcodes it. - `volcengine` passes the prepared role into the body. `ThinkFlowLab#650` Tests: `tests/test_seed_audio.py` (39 passed), with red proof on both halves. Without the adapter pass-through the separation request goes out as `reference_audio`; without the preparation change the separation manifest raises `KeyError: 'audio_role'`.
## summary Ark can only read media from an address it can fetch itself, so 翻配, 视频参考 and 按字幕配音 all need the same thing first: the source media in object storage the user owns, handed over as a signed URL. The store already reads `storage` from a resolved model configuration, but nothing wrote it, so every dubbing call died on `seed_audio_storage` before any request went out. This adds the missing owner without inventing a second place for credentials: - `ModelConfigs` keeps `storage` (`accessKey`, `secretKey`, `bucket`, `region`) on the account layer next to the API key, so one Ark service and one bucket serve every model under it. It is validated on read, hoisted into the shared service record on write, and carried across edits of any model in that account. - `storage()` answers Bucket, Region and whether the account is configured; neither secret is ever returned. `save_storage()` treats a blank field as "keep the stored value", so a settings screen never has to echo a secret back to change a bucket. - An incomplete account is refused as a whole instead of failing later inside an adapter. `ThinkFlowLab#650` Tests: `tests/test_model_configs.py` (36 passed) covers sharing across one account, restart, secret masking, blank-field updates and refusal; `tests/test_seed_audio.py` (41 passed) covers dubbing going out with the presigned address, and refusing before any request when no account is configured. The credential contract is written down in `docs/architecture/unified-project.md`.
## summary
The storage account added for remote-fetch providers had no way in from
outside the process, so a user could not actually configure 翻配 or
视频参考. Two endpoints on the existing model-service resource close that:
`GET /api/model-services/{id}/storage` reports the bucket, region and
whether the account is usable, `POST` stores the four credentials.
Neither secret comes back: the response is a separate public shape with
no key fields at all, and the saved account is shared by every model of
the same provider service. A blank field keeps the stored value, so
changing a bucket never requires re-entering the secret, and an account
with only some of the four fields is refused up front.
The two refusals carry stable codes (`model_storage_incomplete`,
`model_storage_invalid`) registered in the contract issue codes and the
English catalog, so the interface answers them in its own language
instead of echoing Chinese.
`ThinkFlowLab#650`
Tests: `tests/test_model_configs.py` (37 passed) covers the read before
any account exists, saving, masking, blank-field updates, the 409
refusal in both languages and the 404 for a deleted service;
`tests/test_creation_contracts.py` (82 passed) regenerates and checks the
new contract shapes.
10b69ac to
51de24a
Compare
david6666666
left a comment
There was a problem hiding this comment.
REQUEST CHANGES 51de24a Refs #650
这次只改了 NodeComposer 和 model.ts:移除了新增的说明性代码注释,未改变翻配流程。简洁性重新计分,上一轮的真实 Ark 翻配证据缺口仍在;用 HTTP double 产出的 MP4/MP3/SRT 不能代替真实服务。沿用上一轮给出的最小验收,不新增重复行内意见。
Ran: 核对 exact-head diff、Release 47321698327 截止时尚未结清。Not run: 本地测试或真实服务。当前证据暂定 47/100,非批准分(范围 2、正确性 2、验证 2、证据 0、简洁性 2;每项满分 3)。Dot,代表 @david6666666,非表决。
david6666666
left a comment
There was a problem hiding this comment.
REQUEST CHANGES 51de24a Refs #650
补同一 head 的 CI 结果:Python、前端、桌面通过;isolated browser 的 canvas progressive load 失败,断言是屏外节点在进入 viewport 前不得提前加载。没有证据系 Seed Audio 改动导致,也不能当成已过。真实 Ark 翻配的视频、音轨、字幕与重开证据仍缺,沿用上轮验收建议。
Ran: 同 head Release 47321698327 及失败日志。Not run: 本地复跑或真实 Ark。当前证据暂定 47/100,非批准分(范围 2、正确性 2、验证 2、证据 0、简洁性 2)。Dot,代表 @david6666666,非表决。
- add operation, language, audited-SRT, voice and outputVideo inputs to the canvas audio composer, and play a video result in the node - list subtitle side artifacts separately so they stay reviewable without becoming adoptable node versions, and count the badge with the same filter as the version dialog - validate every SRT cue locally and report a refused input as an input failure with specific zh-CN/en-US guidance before any provider request - keep separation stem identity and mix a composite track, mux a playable re-voiced video, and record target/source subtitles from dubbing - document the user journey and the live verification receipts
Screenshots and a screen recording of the audio node playing a dubbed video, the version dialog with subtitle side artifacts, and the English version dialog. Recorded on the canvas at project 03052168.
david6666666
left a comment
There was a problem hiding this comment.
REQUEST CHANGES bb8f6f5 Refs #650
上轮缺的真实产物已经补齐了。我下载并完整解码两段带音轨 MP4、两段 composite 和四份分轨/混音,并核对英配的源/目标 SRT,10/10 SHA-256 与清单一致。录屏和 reopen 回执显示 4 个版本、4 个附件;证据绑定 67d99a27,到这版只有文档、删注释和忽略文件调整。这里核验的是作者提供的 Ark 结果,不是我重跑 provider;registered voice 仍无实测。
还剩一个会误导审片的 UI 问题:英语译配中,中文源字幕也标「英语」。截图就能看到这个反例,原因是源/目标附件都读 job 的 targetLanguage。建议按附件角色选对应语言;源语种没填且无法获知时,不显示猜测值。
Ran: 静态走查、视频/音频解码、字幕摘要、回执及 CI 状态;Release 尚未完成。当前 82/100(非批准):范围 3、正确性 2、验证 2、证据 3、简洁性 2。
English: The supplied media and subtitle hashes match. Source subtitles must not inherit the dubbing target language.
Dot,代表 @david6666666。
| const [open, setOpen] = useState(false); | ||
| const role = artifactRoleKey(version); | ||
| const note = [ | ||
| artifactDetailKey(version) |
There was a problem hiding this comment.
这里所有附件都用 targetLanguage。中文原声→英语译配时,「源字幕」也会标英语,截图里的源字幕行已出现。源字幕请读明确的 source language;自动检测但没有语言回执时就留空。 (Label source and target subtitles separately.)
- let an audio node adopt the video primary its own dubbing job produced - expose the Seed Audio object-storage setup in the model-service form - resume recorded sibling artifacts instead of losing them on retry - stop advertising the unpublished reference operation - keep a failed upload temp-file cleanup from masking the transfer result Co-Authored-By: Claude Code <noreply@anthropic.com>
A stored Seed Audio storage failure kept its Chinese text persisted in the job record, so the English card fell back to the generic input category. Map the storage-required and upload-failure messages to bilingual copy. Co-Authored-By: Claude Code <noreply@anthropic.com>
clear() removed the artifacts and artifacts.json but left artifact-locators.json with presigned URLs behind. Unlink it too. Co-Authored-By: Claude Code <noreply@anthropic.com>
david6666666
left a comment
There was a problem hiding this comment.
非表决 COMMENT · 0187ee0 · Refs #650
技术意见:目前不建议合入。源字幕仍会套目标语言,沿用原行内意见。另发现编辑服务时,迟到的对象存储预填会清空用户刚输入的 Access Key / Secret Key,回归建议已标在代码上。
这版补了按回执恢复配音附件的路径与测试。源码覆盖重启后继续取已记录的附件;我没在这个 SHA 重跑 Ark。上轮独立解码的真实 MP4、分轨和 SRT 仍能证明那些产物,但不能代替新重试路径的实测。当前 Release checks 尚未完成。
当前证据暂定 82/100,非批准分(范围 3、正确性 2、验证 2、主张证据 3、简洁度 2;各满分 3)。
English recap: Preserve typed storage credentials when a late prefill arrives, and keep source subtitle labels independent of the target language. This is a non-voting comment.
Dot,代表 @david6666666。
| readModelStorage(connectionId) | ||
| .then((state) => { | ||
| if (!alive) return; | ||
| setStorage({ |
There was a problem hiding this comment.
编辑已有服务时,readModelStorage 没返回前字段已经可编辑。用户先输入新的 Access Key / Secret Key,迟到的响应会把这两个值一起清空。请保留已编辑字段,或在预填完成前禁用这组输入;加一例延迟 GET、先输入再放行响应的回归。 (A late storage prefill must not erase user edits.)
…inimal # Conflicts: # docs/development/lessons.md
Independent candidate review — PASS, 100/100Reviewed by a separate non-contributing reviewer with the
Blocking findingsNone. Evidence the reviewer verified
Non-blocking residuals
Material validation gaps
|
david6666666
left a comment
There was a problem hiding this comment.
非表决 COMMENT · f871007 · Refs #650
同一 head 的 Release checks 已全绿,复评 88/100(范围 3、正确性 2、验证 3、主张证据 3、简洁度 2;各满分 3)。这轮只更新 CI 结论,不建议现在合入:对照当前源码,迟到的存储预填会清空刚输入的值,源字幕还会显示目标语种。候选复评里验证的中英错误文案、附件缓存清理是另外两项修复,不能关闭这两条。
我核对了同版 CI 和源码,未再跑真实 Ark。请在原线程补延迟读取和中转英显示各一条回归,不另开重复行内意见。
English recap: Exact-head Release checks are green. The two linked issues (late storage prefill and source subtitle language) remain on this head. Non-voting review only.
Dot,代表 @david6666666。
Summary
Adds a
seed-audioadapter profile for 火山方舟 Seed Audio 1.5 (doubao-seed-audio-1-5-261128) on the Content Generation API (POST /api/v3/contents/generations) and completes the canvas/agent surface needed to use it on a real project.This tip closes the remaining user-facing and persistence gaps:
.srtonly when dubbing is chosen, offers the measured preset voices plus a registered-voice input, and shows a "可播放配音成片" (outputVideo) toggle when a video is connected. Inapplicable fields are cleared when the operation or model changes; a persisted operation the selected model does not publish falls back to speech.text2audiowith a video reference andoutputVideomuxes the generated speech onto the picture with-c:v copy, and the audio node renders a playable video card. This is the path that executes a scene prompt such as Prompt 1, which the dubbing API cannot accept as text.GET/POST /api/model-services/{id}/storageendpoint are wired together under an 对象存储 / Object storage section for the Seed Audio content model: Access Key, Secret Key, Bucket and Region. All four are required together; partial entry disables Save with a bilingual message, and all four blank keeps speech-only use. Saving stores the credentials server-side and never renders the secret back. A storage failure keeps its specific bilingual guidance on the job card after a restart, instead of collapsing to the generic input message.targetLanguagerecorded on every version.speaker:0) is preserved and a localamixcomposite track is added, so the timeline can take the independent track or the full mix.end >= start, every cue inside the video) before upload; a refused input is a localinputfailure with specific zh-CN/en-US guidance, not a provider error.audiojob produced (the playable re-voice result), and a failed sibling download is resumed from the recorded artifact locators on retry instead of re-posting the generation. The adoption path has a regression test that fails on the previous revision; the retry path is covered at the provider and runtime layers.The adapter keeps one concern: Seed Audio 1.5 is reachable through the existing
generation.submitcommand and agent tools; no new command was added.Linked issue
Refs #650— keeps the issue open. All live receipts below were produced on this branch; registered-voice upload remains an external-account gap (see below).Labels
type:feat,area:provider,area:canvas,modality:audio. This fork author has no label permission; a maintainer needs to apply them.Test plan
Reviewed tip
f8710072against base104cd9ed(currentorigin/main).pytest tests/test_seed_audio.py tests/test_localization.py tests/test_generation_errors.py tests/test_creation_generation_service.py -q— 137 passedpytest tests/test_seed_audio.py tests/test_agent_seed_audio.py tests/test_creation_assets.py tests/test_creation_canvas_service.py tests/test_creation_generation_service.py tests/test_creation_history_service.py tests/test_creation_node_versions.py tests/test_result_artifacts.py tests/test_generation_errors.py tests/test_generation_recovery.py tests/test_localization.py tests/test_tos_transfer.py tests/test_model_configs.py -q— 341 passednpm test— 1129 pass, 0 failnpm run build— cleannpm run check:i18n— 3929 keys, 0 problemsscripts/generate_contracts.py --check,lint-imports— cleantest_the_audio_node_adopts_the_dubbed_video_its_own_job_produced— rejects withrejectedwhen theread_version_mediaallowance for a primary video on an audio node is reverted.test_a_failed_extra_download_is_resumed_without_reposting— asserts one POST, three recorded locators and zero cached artifacts after a subtitle download timeout, thenresume_artifactsreturns all three without a second POST.test_a_download_retry_resumes_recorded_sibling_artifacts— runtime restart afterdownloadrecovery resumes the primary and the recorded sibling.a stored object-storage failure keeps its storage guidance in both languages— fails when the Seed Audio storage messages are removed fromgenerationFailureText.ts; the English card then falls back to the generic input text.test_artifact_index_survives_a_restart_and_clears_with_the_task— records a locator and assertsartifact_locators()is empty afterclear(); fails whenartifact-locators.jsonis removed from the unlink list.a persisted operation the model does not publish falls back to speech,a playable re-voice is requested only for speech, andonly the Seed Audio content model asks the account for object storage.f8710072(base104cd9ed) — all jobs success: static, python, browser (isolated), browser (voice), browser (assistant), frontend, desktop windows, desktop macOS, and the aggregate checks job. Earlier tips could not complete the wheel-install step becauseopentelemetry-api 1.46.0(published 2026-12-04T17:20Z) breaksfastapi 0.165.1withTypeError: get_logger() takes 1 positional argument...; that had greenstatic/browser jobs oned13b6e1and redfrontend/macOS/Windows only at Verify installed wheel without Node.js. The central fix [bugfix] packaging: cap opentelemetry-api<1.46 to avoid FastAPI ASGI TypeError #691 (opentelemetry-api<1.46) is merged intoorigin/mainat976d4c3fand merged here, so this run tests the tip with the pin.opendirector-reviewcandidate review of base104cd9ed/ headf8710072returned PASS, 100/100 (Scope 3/3, Correctness 3/3, Validation 3/3, Claim evidence 3/3, Simplicity 3/3). Non-blocking residuals and the material validation gaps are listed under "Known gaps". The verdict and score are also posted as a comment on this pull request.Evidence that it works
Recorded against a real Ark key and TOS bucket, with a project reopened from disk.
Object-storage account setup (new user-visible UI)
Persisted storage-failure guidance (new user-visible fix)
Steps: on the local dev server, the audio dubbing node with its
Classroom videoreference was submitted against a storage-less火山方舟 / 内容生成service; the toast reported the failure, then the project was reloaded and the failed job was opened in 生成历史 / Generation history, which reads the persisted job record. The storage-less service was removed afterwards and the real service was not modified.BY_MESSAGEmappings temporarily removed on the dev server and the page reloaded, the same persisted job collapsed to the generic input message, reproducing the reported defect.a stored object-storage failure keeps its storage guidance in both languagesfails without the mappings.Canvas and artifacts
Published evidence on the fork's
evidence/seed-audio-1-5branch (screenshots commit053618da):LocalProjectsload: 10 jobs, 13 results, 16 assets, 4 versions, 4 artifacts.Live receipts (each a
generation.submitthrough the business service, providerdoubao-seed-audio-1-5-261128, sourcevideo-intact.mp4, video 19.7667 s / audio 19.776 s, sha2565c3a222b…):text2audio+ video +outputVideo)video_url; 19.767 s MP4, picture copied, speech muxed; 19.2–19.8 s tail mean −66.1 dB (silent ending); composite track preserveddubbing,targetLanguage=en)subtitleAssetId)taskType=separation)speaker:0,sfx:0,bgm:0at 19.8008 s and derivedcomposite:0at 19.8269 s; distinct sha256zh_female_vv…zh_female_tianmeitaozi) answered 200 with one audio artifact each on 2026-12-05category=input, specific bilingual messageLocalProjectsload: 10 jobs, 13 results, 16 assets; the 6 results and all generated assets point at the same dubbing job; versions 4, artifacts 4Provider verification
outputVideo.POST /api/v3/fileswithpurpose=voicerequires a valid Ark project name; this environment cannot obtain one (InvalidParameter: Project is invalid), and the previously storedfile-v-…id answers 404. The adapter sends registered voices asfile://and the request body is pinned bytest_a_voice_reference_uses_the_registered_scheme; preset voices (speaker://) are verified live.Bilingual UI
zh-CNanden-UStogether: composer labels, the object-storage section and its incomplete/saved messages, the version/artifact panel, and the specific SRT/voice/scope failure guidance. The SRT, voice-scope and playable-video scope codes are part of the command issue contract, so a submit-time refusal keeps its specific message instead of collapsing toinvalid_input; object-storage failures have English copy too.zh-CNanden-US;check:i18nis clean (3925 keys).Known gaps
targetLanguage, but those are proven by receipts rather than a separate recording.saveManythensaveModelStorage) and is not atomic. If the storage write fails after the service save, a retry of a brand-new service can create a duplicate connection; the service itself is already saved and remains usable.素材/字幕/视频上传失败…) share the mapped path and are covered by the unit test rather than separate screenshots.opentelemetry-api 1.46.0/ FastAPI 0.165.1 incompatibility described above; the central [bugfix] packaging: cap opentelemetry-api<1.46 to avoid FastAPI ASGI TypeError #691 pin is now merged in, and run47404538022for this tip passed every job. Fullpytest tests -m cpu, the isolated browser journey and wheel install are left to CI rather than claimed locally.