Skip to content

feat(tools): add MiniMax voice cloning - #305

Open
octo-patch wants to merge 1 commit into
EverMind-AI:mainfrom
octo-patch:feat/minimax_voice_cloning
Open

feat(tools): add MiniMax voice cloning#305
octo-patch wants to merge 1 commit into
EverMind-AI:mainfrom
octo-patch:feat/minimax_voice_cloning

Conversation

@octo-patch

Copy link
Copy Markdown

Reason: Add executable voice cloning for the configured MiniMax backend.

Summary

  • Add a voice_clone tool that uploads MP3, M4A, or WAV source audio and creates a reusable voice.
  • Support global and China endpoints, optional prompt audio, transcript validation, normalization, noise reduction, preview text, and watermark controls.
  • Inherit the configured MiniMax provider key and register the tool only when its media configuration is enabled.
  • Parse upload and clone API status responses and return the created voice identifier.

Type

  • Fix
  • Feature
  • Docs
  • CI / tooling
  • Refactor
  • Other

Verification

  • uv run --frozen pytest -q -p no:everos_plugin tests/test_media_gen_voice_clone_minimax.py (4 passed)

  • uv run --frozen pytest -q -p no:everos_plugin tests/test_config_raven_sections.py (20 passed)

  • uv run --frozen ruff format --check raven/agent/tools/media_gen.py raven/agent/loop/main.py raven/config/schema.py tests/test_media_gen_voice_clone_minimax.py

  • uv run --frozen ruff check --ignore I001 raven/agent/tools/media_gen.py raven/agent/loop/main.py raven/config/schema.py tests/test_media_gen_voice_clone_minimax.py

  • uv run --frozen python -m py_compile raven/agent/tools/media_gen.py raven/agent/loop/main.py raven/config/schema.py tests/test_media_gen_voice_clone_minimax.py

  • git diff origin/main...HEAD --check

  • Relevant tests pass locally

  • Relevant lint / type checks pass locally

  • User-facing docs or screenshots are updated when needed

Risk

  • Security impact considered
  • Backward compatibility considered
  • Rollback path is clear for risky changes

The tool is opt-in and preserves existing media behavior. Rollback consists of removing the tool registration and its configuration field.

Related Issues

N/A

@Handsome-wzw

Copy link
Copy Markdown

Nice addition. One thing worth settling before this lands: voice_clone
introduces a fourth shape for "is this tool configured", and the two places that
answer it disagree.

effective_media_config counts the tool as configured on
api_key or api_base or model, but registration in agent/loop/main.py still
gates the whole media family on api_key or model. So an install that sets only
tools.media.voice_clone.apiBase and has no providers.minimax key:

effective_media_config says configured: True
registration rule says:                 False
api_key after the borrow:               ''

The tool is declared configured, never registered, and nothing says why.
Reproduced against this branch.

Either rule is defensible; they just need to be the same one. If api_base
alone is not meant to switch it on, dropping it from the voice_clone_configured
test makes the two agree. If it is, registration needs to learn the rule.

Heads-up on the interaction with #312, which adds a table describing exactly
these rules plus a raven doctor section that reports them. Its coverage test
derives the gated tools from the schema, so whichever of the two lands second
turns that assertion red on purpose:

gated but undeclared: ['voice_clone']

The fix is one entry in raven/agent/tools/capabilities.py -- but it needs the
rule above settled first, since the entry has to state which one is true. Happy
to add it on my side once you decide, or to leave it to you if this merges first.

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