Skip to content

[feat] cli: create an editable project speech node - #674

Open
twu3202 wants to merge 3 commits into
ThinkFlowLab:mainfrom
twu3202:feat-cli-create-speech
Open

twu3202 wants to merge 3 commits into
ThinkFlowLab:mainfrom
twu3202:feat-cli-create-speech

Conversation

@twu3202

@twu3202 twu3202 commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add opendirector audio create-speech to place an editable speech node on the project canvas. Supply text, canvas coordinates and a model whose adapter supports audio.speech. You can also provide a voice or a saved voice-library record from the same connection. This works with generic TTS, MOSS, MiniMax and GLM-TTS. The receipt includes a separate generation submit command pinned to both saved revisions. In direct CLI use it retains the API URL and any explicitly supplied edit session.

Linked issue

Refs #663. Its benchmark registry includes adding voice and music to an existing silent video. This PR covers the speech-node creation step.

Labels

Suggested: type:feat, area:agent, modality:audio.

Test plan

  • python -m pytest -q tests/test_cli.py tests/test_cli_discovery.py — 102 passed. The three provider regressions failed on the previous PR head. Each now creates a bound canvas node and stores the chosen model, text and voice without submitting a job. The suite also covers generic TTS, rejection of a music-only model, retries, stale revisions and the agent gateway (stubbed transport).
  • python -m pytest -q tests/test_minimax_speech.py tests/test_moss.py tests/test_zhipu.py — 244 passed using test fixtures. The frontend build, i18n check and PR-diff hooks passed.
  • Reviewed base 461f31e44249fcccc12f152adc1e2b79b3348b50 and head 5f4ea376fa65a43988c42fde25049c1dd7029273. Hosted Release checks and CodeQL on this head await the update.
  • Independent pre-submission review on this base and head: 93/100. The reviewer independently exercised the CLI through the agent gateway and inspected the recording and receipt from this head.

Evidence that it works

The recording starts with an empty project. It creates nodes for moss-tts-1.5-flash, speech-2.8-hd and glm-tts, then repeats each command with the original operation ID. The project receipt shows identical replays, three saved items and speech specs, and zero jobs after reload. The text for all three was 请听这一句旁白。.

The three saved speech nodes with GLM-TTS selected

Download the MP4.

Provider verification

The recording uses local model configurations and voice-record fixtures. It verifies node creation and persistence. No provider was contacted and no audio was synthesized. Submitting the returned command checks the original revisions and the provider's generation requirements.

Bilingual UI

The command help, voice-record and blank-input messages, receipt description and usage guide are available in English and Chinese. Model lookup uses the existing CLI diagnostics. The canvas uses its existing localized audio node.

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WITHHOLD bcea44b Refs #663 · 非表决意见

下载、完整解码并抽看了 13.04 秒录屏,截图与 replay receipt 支持建节点、重载和幂等复用。这里并不宣称已生成语音;录像没有 provider 调用。主要问题是 CLI 用单个 tts profile 当能力判断,会把产品现有的几类 TTS 模型挡在建节点之前。细节见行内。

当前证据暂定 85/100(范围 3,正确性 2,验证 2,主张证据 3,简洁性 3;均满分 3)。当前 Release、CodeQL、DSH 已绿;未独立重跑 CLI 或 provider。

Dot,代表 @david6666666。

Comment thread packages/core/src/opendirector/cli.py Outdated
models = context["models"] if context is not None else client.models()
config = select_model([m for m in models if m["kind"] == "audio"], model)
rules = config.get("inputRules") or {}
if rules.get("profile") != "tts":

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里把 profile == 'tts' 当作是否支持朗读,但 main 的 input_rules 会把 MOSS、MiniMax 和 GLM-TTS 分别标成 moss-speech、minimax-speech、zhipu-speech。用户已配置有效朗读模型,仍会被提示换模型。建议复用现有语音能力判断并补一条非 tts profile 的建节点测试;如果一期刻意只支持通用 profile,就把 help 和指南写清楚,别说这些连接不是 TTS。

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PASS 5f4ea37 Refs #663

上一轮的 profile 问题已修掉:CLI 按 audio.speech capability 判断,MOSS、MiniMax、GLM 的各自 profile 不再被挡下。下载、完整解码并抽看了 15.52 秒录屏;截图和回执一致,三种配置各保存一个节点,同 operation ID 重放没有副本,重开后仍是 3 个节点、0 个 jobs。这里验证的是建节点、持久化和回执,不是已经合成语音。

93/100(范围 3,正确性 3,验证 2,主张证据 3,简洁性 3;各满分 3)。Ran: diff、录屏/截图/回执以及此 head 的 Release、CodeQL、DSH 核对。Not run: 本地 CLI 或真实 provider。当前 main 的独立合入没有冲突,不要求为此 rebase。

Dot,代表 @david6666666;非表决。Coordinator: 按仓库流程集成。

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants