Skip to content

feat: add MiniMax TTS integration#16

Open
octo-patch wants to merge 1 commit intoysharma3501:mainfrom
octo-patch:feature/add-minimax-tts-integration
Open

feat: add MiniMax TTS integration#16
octo-patch wants to merge 1 commit intoysharma3501:mainfrom
octo-patch:feature/add-minimax-tts-integration

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

This PR adds a NovaSR/minimax_tts.py module that integrates MiniMax TTS with NovaSR's audio super-resolution pipeline — fulfilling the use case already described in the README:

"Enhancing models: NovaSR can enhance TTS model quality considerably with nearly 0 computational cost."

What's added

  • NovaSR/minimax_tts.py — Two public functions:

    • generate_speech(text, ...) — streams the MiniMax TTS API (speech-2.8-hd / speech-2.8-turbo) and returns MP3 bytes; reads MINIMAX_API_KEY from the environment
    • generate_and_enhance(text, upsampler, ...) — one-call pipeline: MiniMax TTS → FastSR → 48 kHz enhanced audio
  • tests/test_minimax_tts.py — 13 unit tests (fully mocked / offline, all passing)

  • README.md — MiniMax TTS integration section with copy-paste examples

Usage

import os
from NovaSR import FastSR
from NovaSR.minimax_tts import generate_and_enhance
import torchaudio

os.environ["MINIMAX_API_KEY"] = "your_minimax_api_key"

upsampler = FastSR()
enhanced = generate_and_enhance("Hello, world!", upsampler=upsampler)
torchaudio.save("enhanced.wav", enhanced.cpu(), 48000)

API references

- Add NovaSR/minimax_tts.py with generate_speech() and generate_and_enhance()
- generate_speech() streams MiniMax TTS API (speech-2.8-hd / speech-2.8-turbo)
  and returns MP3 bytes; supports MINIMAX_API_KEY env var
- generate_and_enhance() combines MiniMax TTS with FastSR to produce
  48 kHz enhanced audio in one call, fulfilling NovaSR's stated use case
  of enhancing TTS model quality with near-zero computational cost
- Add unit tests (13 tests, all passing, fully mocked/offline)
- Update README with MiniMax TTS integration examples
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