Skip to content

feat: add MiniMax TTS provider support#72

Open
octo-patch wants to merge 1 commit intogyoridavid:mainfrom
octo-patch:feature/add-minimax-provider
Open

feat: add MiniMax TTS provider support#72
octo-patch wants to merge 1 commit intogyoridavid:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

This PR adds MiniMax as an optional cloud TTS provider alongside the existing local Kokoro TTS engine.

  • Add MiniMaxVoiceEnum with 6 English voice options (English_Graceful_Lady, English_Insightful_Speaker, English_radiant_girl, English_Persuasive_Man, English_Lucky_Robot, English_expressive_narrator)
  • Add src/short-creator/libraries/MiniMax.ts — a fetch-based MiniMax TTS client using the MiniMax T2A v2 API
  • Update ShortCreator to auto-route TTS calls: when a MiniMaxVoiceEnum voice is selected, use MiniMax TTS; otherwise fall back to Kokoro (default unchanged)
  • MiniMax voices are exposed through the existing GET /api/voices endpoint alongside Kokoro voices
  • Add MINIMAX_API_KEY environment variable support (optional — Kokoro remains the default, no breaking changes)
  • Add unit tests and a live E2E integration test for the MiniMax TTS library

Usage

Set MINIMAX_API_KEY in your .env file, then pass any MiniMaxVoiceEnum value as the voice field when creating a video:

{
  "scenes": [{ "text": "Hello world!", "searchTerms": ["nature"] }],
  "config": { "voice": "English_Graceful_Lady" }
}

Kokoro remains the default when voice is unset or a VoiceEnum value is used.

API Reference

- Add MiniMaxVoiceEnum with 6 English voice options
- Add MiniMax TTS library class with fetch-based API integration (non-streaming)
- Update ShortCreator to auto-route to MiniMax TTS when a MiniMax voice is selected
- MiniMax voices appear in /api/voices endpoint alongside Kokoro voices
- Add MINIMAX_API_KEY environment variable support (optional, Kokoro remains default)
- Add unit and E2E tests for the MiniMax TTS library
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.

1 participant