minimax

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package minimax provides Minimax text-to-speech.

Index

Constants

View Source
const DefaultLLMModel = "abab6.5s-chat"

Variables

This section is empty.

Functions

func NewClient

func NewClient(apiKey string) *openai.Client

NewClient returns an OpenAI-compatible client for Minimax (use MINIMAX_BASE_URL for proxies or minimax-m2).

Types

type LLMService

type LLMService struct {
	// contains filtered or unexported fields
}

LLMService implements services.LLMService using Minimax's API (OpenAI-compatible when using compatible endpoint).

func NewLLMService

func NewLLMService(apiKey, model string) *LLMService

NewLLMService creates a Minimax LLM service.

func (*LLMService) Chat

func (s *LLMService) Chat(ctx context.Context, messages []map[string]any, onToken func(*frames.LLMTextFrame)) error

Chat runs a completion and streams tokens as LLMTextFrame.

type TTSService

type TTSService struct {
	// contains filtered or unexported fields
}

TTSService implements services.TTSService using Minimax TTS API.

func NewTTS

func NewTTS(apiKey, baseURL, model, voiceID string) *TTSService

NewTTS creates a Minimax TTS service.

func (*TTSService) Speak

func (s *TTSService) Speak(ctx context.Context, text string, sampleRate int) ([]*frames.TTSAudioRawFrame, error)

Speak synthesizes text and returns TTS audio frames.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL