Skip to content

Add speech voice clone and design commands - #221

Open
octo-patch wants to merge 1 commit into
MiniMax-AI:mainfrom
octo-patch:octo/20260802-voice-clone-tool-recvqKYlmoyEMz
Open

Add speech voice clone and design commands#221
octo-patch wants to merge 1 commit into
MiniMax-AI:mainfrom
octo-patch:octo/20260802-voice-clone-tool-recvqKYlmoyEMz

Conversation

@octo-patch

@octo-patch octo-patch commented Aug 2, 2026

Copy link
Copy Markdown

Reason: Add voice cloning and voice design support to the speech CLI and SDK.

Changes:

  • Add voice clone and voice design endpoint helpers and response/request types.
  • Add mmx speech clone and mmx speech design commands.
  • Add speech SDK helpers for clone/design and clone/prompt audio upload purposes.
  • Cover the new command registry entries, dry-run payloads, and SDK request parsing with tests.

Checks:

  • bun test test/commands/speech/clone.test.ts test/commands/speech/design.test.ts test/sdk/speech.test.ts test/commands/aliases.test.ts
  • bun run typecheck
  • bun run lint
  • bun test

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@NianJiuZst
NianJiuZst self-requested a review August 4, 2026 10:37
@NianJiuZst NianJiuZst self-assigned this Aug 4, 2026

@NianJiuZst NianJiuZst 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.

Thanks for adding voice cloning and voice design support. I do not recommend merging this PR in its current form because the new CLI and SDK contracts do not match the official MiniMax APIs.

The main blockers are:

  1. Voice Design requires both prompt and preview_text. voice_id is optional, but this implementation makes it required and never sends preview_text, so real design requests can fail with an invalid-input response. Please add preview_text to the CLI, SDK type, validation, and tests, and make voice_id optional. See the Voice Design API.

  2. Voice Clone and Voice Design have different response shapes and should not share VoiceResponse. The clone endpoint does not return voice_id; it returns fields such as input_sensitive, demo_audio, extra_info, and base_resp. As written, speech clone --quiet prints undefined, while the SDK exposes an incorrect clone response type. Conversely, the design response includes trial_audio, which is missing from the current type. See the Voice Clone API.

  3. The SDK rejects clone requests without model, although the official contract only requires file_id and voice_id; model is required only when preview text is provided. The current request type does not expose text at all.

  4. Please also align file_id serialization with the documented integer<int64> schema. The direct --file-id path currently sends a JSON string, and the tests assert string IDs rather than the provider's documented request shape.

I applied the commit to the latest main: lint, typecheck, build, the focused tests (26/26), and the full suite (459/459) all pass. However, the new tests use mocks that mirror the same incorrect request and response shapes, so they do not validate compatibility with the real API.

Please split the endpoint-specific request/response types and update the mocks from the official schemas. Until the design request and clone response issues are fixed, this PR should not be merged.

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