Skip to content

feat: add MiniMax TTS support to talk-llama example#3755

Open
octo-patch wants to merge 1 commit into
ggml-org:masterfrom
octo-patch:feature/add-minimax-tts
Open

feat: add MiniMax TTS support to talk-llama example#3755
octo-patch wants to merge 1 commit into
ggml-org:masterfrom
octo-patch:feature/add-minimax-tts

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

This PR adds MiniMax as a TTS provider option to the talk-llama example, alongside the existing ElevenLabs integration.

Changes

  • examples/talk-llama/minimax-tts.py — New standalone Python TTS client that:

    • Calls the MiniMax t2a_v2 API with SSE streaming
    • Decodes hex-encoded audio chunks into an MP3 file
    • Supports 6 English voices (see --list)
    • Matches the CLI interface of eleven-labs.py (-v, -n, -s, -p flags)
    • Requires only the Python standard library (no extra pip install)
  • examples/talk-llama/speak — Updated to detect MINIMAX_API_KEY and use MiniMax TTS as a fallback when ElevenLabs is unavailable.

Usage

# Set your MiniMax API key
export MINIMAX_API_KEY=your_api_key

# List available voices
python3 examples/talk-llama/minimax-tts.py --list

# Save TTS to file
python3 examples/talk-llama/minimax-tts.py -s output.mp3 input.txt

# Play directly (requires ffplay)
python3 examples/talk-llama/minimax-tts.py -p input.txt

# Or let the speak script auto-detect it
./examples/talk-llama/speak 0 input.txt

API Reference

Add minimax-tts.py script for MiniMax text-to-speech integration
in the talk-llama example, alongside the existing ElevenLabs option.

- Add examples/talk-llama/minimax-tts.py: standalone Python TTS client
  using MiniMax t2a_v2 API with SSE streaming and hex-decoded audio
- Update examples/talk-llama/speak: detect MINIMAX_API_KEY env var and
  fall back to MiniMax TTS when ElevenLabs is unavailable

MiniMax TTS API: https://platform.minimax.io/docs/api-reference/speech-t2a-http
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