Repository navigation
[feat] audio: add Volcengine Ark Seed Audio 1.5 text-to-audio adapter - #661
Zhangbo-cn wants to merge 79 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.
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
Update — acceptance-criteria map added and verifiedThe PR body now carries an "Acceptance criteria this change covers" table mapping all 13 #650 criteria (2 Agent + 11 canvas) to the evidence at this head. The independent reviewer checked it row by row. Two rows were corrected to Partial where the evidence did not support a full claim:
The audio-reference row, the Agent caveats (no live Agent transcript/reopened continuation; dialogue lines not ASR-verified) and the registered-voice wording were also aligned with the receipts. After the correction the reviewer found no overclaim and returned PASS, 100/100 again (base |
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。
ThinkFlowLab#692 split the Python suite into three shard manifests, but ThinkFlowLab#676 added tests/test_ark_availability.py after that list was generated, so the manifest-coverage test fails on current main. Enroll that module together with the seed-audio modules this branch adds so each test module is collected exactly once.
david6666666
left a comment
There was a problem hiding this comment.
REQUEST CHANGES f871007 Refs #650 (技术结论;本条是非表决 COMMENT)
82/100(范围 3、正确性 2、验证 2、主张证据 3、简洁度 2;各满分 3)。我核对了旧合并基线 104cd9ed 和当前 main 93bd25b:这个 head 的 Release checks 确实全绿,但跑的是拆分前的 Python 测试。当前 main 的 shard manifest 没有这条 PR 新增的四个模块:test_agent_seed_audio.py、test_result_artifacts.py、test_seed_audio.py、test_tos_transfer.py。即使主线补好 Ark 那一项,当前组合里这四项仍会漏掉。请把它们登记到相应 shard,再用新的合并候选验证;单纯重跑旧 CI 没用,也不是因为分支落后就要求 rebase。
验收表把分轨和多参考音频的覆盖说得更准确了。不过最新证据核对的是失败历史和产物清理,不是原先两条意见:晚到的预填仍会清空正在输入的 key,源字幕仍套用目标语言。本轮核对了代码、清单和 CI,没有实跑当前合并组合或调用 Ark。
English recap: The old green run predates sharding. Register the four new test modules and validate the combined candidate; the two existing UI findings still apply.
Dot,代表 @david6666666 作非表决审查。
Source SRT/JSONL artifacts belong to the input language, but both artifact notes appended the version's targetLanguage, so a zh->en dubbing job showed "源字幕 · 英语" / "Source subtitles · English". Build the note once and omit the language for source roles; target rows keep it.
Uploaded MP3s are stored as audio/mpeg, and the adapter forwarded that MIME into the inline data URL. Ark accepts only the mp3 and wav subtypes, so a valid local MP3 reference reached the provider as audio/mpeg and failed. Emit audio/mp3 for audio/mpeg (and audio/wav for audio/x-wav).
Opening an existing service read its object-storage settings asynchronously and replaced the whole form state when the response arrived, silently discarding credentials typed in the meantime. Disable the storage fieldset while the read is pending and merge a late response only into blank fields.
david6666666
left a comment
There was a problem hiding this comment.
当前证据暂定 60/100,非批准分(范围 3、正确性 3、验证 2、主张证据 0、简洁度 2;各满分 3)。上轮三点都有进展:4 个新增测试和 Ark 测试已登记,候选树 171 个测试模块一一对应;源字幕不再套用目标语言,我下载并核对了英文和中文全图;存储表单也加了加载态,并保留当前输入。
还缺一段存储预填修复的实际 UI 证据:请用假 key 和延迟 GET,录下打开已有服务、加载期间不能输入、加载结束后能正常编辑。现有截图证明能重开和预填,但没有拍到这段时序;新单测覆盖合并数据,不是表单交互。按仓库规则,本轮证据项暂记 0,不否定之前已核验的音视频。当前 Release checks 仍在跑,正文的绿灯是 f7e90d78,不能算这版。没有重跑本地测试或调用真实 Ark。
English recap: Test registration and source-subtitle labels are verified. The storage-loading transition needs UI evidence, and exact-head CI is still running.
Dot,代表 @david6666666 作非表决审查。
Advisory score: 100/100 — scope 3/3, correctness 3/3, validation 3/3, claim evidence 3/3, simplicity 3/3 — independent candidate review against base
Ran: |
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.audio/mpeg, but Ark's inline URL only accepts themp3andwavsubtypes; the adapter now emitsaudio/mp3, and a test pins the actual request body.speaker:0) is preserved and a localamixcomposite track is added, so the stems and the full mix are stored as separate reviewable artifacts; the primary result is the adoptable one.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).Acceptance criteria this change covers
A map from #650's criteria to the evidence at head
f3982c56. Statuses are conservative: "Covered" means this branch has a real run or a committed test for the behavior, not that every acoustic or UI sub-check in the issue was measured. Pointers in the status column refer to the sections and rows below.test_the_assistant_returns_a_playable_revoice_for_a_video_referenceandtest_the_assistant_places_the_revoiced_audio_on_the_timelinewith a model double. The evidence has no live conversational Agent transcript and no reopened Agent continuation; the live receipts use the same business service. Dialogue-line correctness is not ASR-verified, and SFX placement, residual source audio and voice similarity are not measured.test_the_assistant_dubs_a_video_into_the_target_languageandtest_the_assistant_places_the_dubbed_voice_on_the_timelinedrive the Agent tool gateway. Same live-transcript and acoustic-caveat note as above.composite:0; the version dialog reports four versions and the side-artifacts panel shows the target/source subtitle files (screenshots "Version dialog" and "Subtitle artifacts"). The cited crop does not show the composite row itself; the receipt and delivery tests do.test_the_assistant_places_the_dubbed_voice_on_the_timeline.maxAudios == 6) with a 2–30 s guard and emits Ark'saudio/mp3/audio/wavsubtypes, but the tests exercise a single reference and multi-sample combinations are not exercised by a test or a live run. The job records the reference asset; timbre similarity is not measured acoustically.speaker:0,sfx:0,bgm:0and the derivedcomposite:0;test_separation_keeps_the_stem_identity_of_the_adopted_resultpins thespeaker:0identity of the primary/adopted result and the sibling stem identities but does not adopt a sibling. Only the primary result is adoptable (test_extra_files_are_never_adopted_in_place_of_the_outputassertsresult_not_adoptablefor a sibling track), so per-stem timeline editing is not implemented in this slice.InvalidParameter: Project is invalid(recorded in the acceptance report), and the previously stored file id then answered 404ResourceNotFound. The adapter'sfile://body is pinned bytest_a_voice_reference_uses_the_registered_scheme; a live registered-voice generation is not available in this account.test_a_failed_extra_download_is_resumed_without_repostingand the runtime recovery test; reopen facts recorded; theseed-tts-2.0path is untouched and its tests pass.The table is intentionally a review map, not a claim that #650 is complete — the registered-voice gap, the missing live Agent transcript and the unmeasured acoustic qualities are why this PR keeps
Refsrather thanCloses.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
f3982c56against base93bd25b0(currentorigin/main). The tip merges current main, including #676 (Ark video availability) and #692 (three Python shards).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— 342 passednpm test— 1132 pass, 0 failf3982c56:npm test— 1132 pass, 0 fail;pytest tests/test_model_configs.py -q— 37 passed. Run pytest withPYTHONPATH=packages/core/src:apps/api/src; the worktree's venv otherwise resolves the main checkout.npm run build— cleannpm run check:i18n— 3929 keys, 0 problemsscripts/generate_contracts.py --check,lint-imports— cleanpytest tests/test_ci_layers.py -q— 21 passed. [ci] python: parallelize suite across three shards and isolate native CLI regressions #692 requires everytests/test_*.pymodule in exactly one shard; this tip enrolls the four modules it adds and upstreamtests/test_ark_availability.py, which fix: map Ark video generation availability (#675) #676 added after the shard list was generated and which currently makes main's owntest_repo_python_shards_manifest_covers_every_test_module_oncefail.origin/mainadvanced from104cd9edto93bd25b0(fix: map Ark video generation availability (#675) #676 Ark video availability mapping, [ci] python: parallelize suite across three shards and isolate native CLI regressions #692 parallel Python shards); both were merged cleanly. The only integration change needed was the shard-manifest enrollment above.test_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.a source subtitle is not labeled with the target language— asserts asource_srt/source_jsonlnote omits the target language whiletarget_srtkeeps it; the before/after browser captures below show the old源字幕 · 英语/Source subtitles · Englishand the fixed rows.an mp3 voice reference uses the subtype Ark accepts— the emitted inline URL startsdata:audio/mp3;base64,; with the old mapping the test recordsdata:audio/mpeg;base64,.a late storage read does not overwrite values the user already typedanda late storage read fills only the fields the user left blank— pin the merge used when the storage read resolves after input.f3982c56(base93bd25b0) — all 12 jobs success: static, python-native, python core / agent-cli / media (the three [ci] python: parallelize suite across three shards and isolate native CLI regressions #692 shards, with the aggregate layer-inventory check), frontend, browser isolated / voice / assistant, desktop windows, desktop macOS, and the aggregate checks job. Earlier tips could not complete the wheel-install step because of theopentelemetry-api 1.46.0/ FastAPI 0.165.1 incompatibility; the central [bugfix] packaging: cap opentelemetry-api<1.46 to avoid FastAPI ASGI TypeError #691 pin has been in main since976d4c3fand remains in this tip.104cd9ed/ headf8710072) passed 100/100. A fresh independent review of this tip found two source-label/MP3 defects and a storage-read race; all three are fixed in the commits above. The storage-transition recording it requested is now linked under "Evidence that it works", and Release checks are green on this exact tip (47477598817), not an earlier SHA. This round's independent candidate re-score is 100/100 on base93bd25b0/ headf3982c56; no blocking findings; the stale Known-gaps sentence was updated, and the non-atomic service+storage save and clear-storage limitation remain disclosed. Material validation gaps remain listed under "Known gaps".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)
Storage-read transition (new user-visible fix)
Steps: on the local dev server, a demo Seed Audio service with a fake key (not a real credential) had saved Bucket/Region. Playwright held
GET /api/model-services/{id}/storagefor 4 s, then opened Settings → Model connections → Audio → Manage. Opening the form makes no provider request; the real service configuration was restored after capture.66070b57ofModelServiceForm.tsxtemporarily restored): the fieldset stayed editable during the read, and the late response replaced the typed Bucket with the stored value — typed during load, input overwritten, recording.disabledwitharia-busy=truewhile the read is held; 18 typed characters are rejected and all four values stay empty; once the read resolves, Bucket/Region are prefilled and editable — loading disabled, typing rejected, prefilled, edited after load, recording.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.Source-subtitle labels (new user-visible fix)
Steps: on the local dev server, open the 4-version dubbing node, enter edit mode, open 历史版本 / Version history, and expand 附件产物 / Side artifacts. The screenshots are the same project before and after the label change (the two source files were temporarily reverted on the dev server and the page reloaded, then the fix restored).
字幕 · 源字幕 · 英语and字幕 · 源字幕 JSONL · 英语.字幕 · 源字幕and字幕 · 源字幕 JSONL; the target rows still read… · 英语.Subtitle · Source subtitles · English.Subtitle · Source subtitles; target rows keep· English.a77e2753on the fork'sevidence/seed-audio-1-5branch.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 (3929 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.pytest tests -m cpulocally: 3796 passed, 131 skipped, and one timing-sensitive failure —tests/test_pipeline.py::test_pipeline_concurrent_branches_and_default_cache_reuse— which passes standalone in 4.5 s and did not fail in the sharded CI run. The isolated browser journey and wheel install are covered by CI, not claimed locally.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 in main, and run47477598817for this tip passed every job.