Skip to main content

livekit-plugins-minimax

PyPI version Python 3.9+ License

MiniMax (海螺AI) 服务专用的 LiveKit Agents 插件,提供完整的语音和语言模型集成解决方案。

✨ 特性

  • 🗣️ 语音合成 (TTS) - 支持MiniMax语音合成服务
  • 🤖 大语言模型 (LLM) - 支持MiniMax对话模型
  • 🎵 高品质语音 - 支持多种音色和情感表达
  • 📦 开箱即用 - 完整的 Python 包支持

📋 支持的服务

服务 描述 文档链接
TTS 语音合成 MiniMax TTS
LLM 大语言模型 MiniMax对话

🛠️ 安装

使用 pip 安装

pip install livekit-plugins-minimax

从源码安装

git clone https://github.com/your-repo/livekit-plugins-volcengine.git
cd livekit-plugins-volcengine
pip install -e ./livekit-plugins/livekit-plugins-minimax

系统要求

  • Python >= 3.9
  • LiveKit Agents >= 1.2.9

⚙️ 配置

环境变量

在使用插件前,请配置以下环境变量:

环境变量 描述 获取方式
MINIMAX_API_KEY MiniMax API密钥 MiniMax控制台
MINIMAX_GROUP_ID MiniMax Group ID MiniMax控制台

.env 文件示例

# .env
MINIMAX_API_KEY=your_api_key_here
MINIMAX_GROUP_ID=your_group_id_here

📖 使用指南

基础使用

from livekit.agents import Agent, AgentSession, JobContext, cli, WorkerOptions
from livekit.plugins import minimax
from dotenv import load_dotenv

async def entry_point(ctx: JobContext):
    agent = Agent(instructions="You are a helpful assistant.")

    session = AgentSession(
        # 语音识别 - 参数可在MiniMax控制台获取
        stt=minimax.STT(model="speech-01-turbo", voice_id="female-tianmei"),
        # 大语言模型
        llm=minimax.LLM(model="MiniMax-Text-01")
    )

    await session.start(agent=agent, room=ctx.room)
    await ctx.connect()

if __name__ == "__main__":
    load_dotenv()
    cli.run_app(WorkerOptions(entrypoint_fnc=entry_point))

高级配置

from livekit.plugins import minimax

# 自定义TTS配置
tts = minimax.TTS(
    model="speech-01-turbo",     # 模型名称
    voice_id="female-tianmei",   # 语音ID
    speed=1.0,                   # 语速 (0.5-2.0)
    vol=1.0,                     # 音量 (0.0-2.0)
    pitch=0,                     # 音调 (-12到12)
    emotion="neutral"            # 情感 (neutral, happy, sad, angry)
)

# 自定义LLM配置
llm = minimax.LLM(
    model="MiniMax-Text-01",     # 模型名称
    temperature=0.7,             # 温度
    max_tokens=2000,             # 最大token数
    system_prompt="你是一个有帮助的AI助手"  # 系统提示词
)

🔧 API 参考

TTS (语音合成)

minimax.TTS(
    model: str = "speech-01-turbo",     # 模型名称
    voice_id: str = "female-tianmei",   # 语音ID
    speed: float = 1.0,                # 语速 (0.5-2.0)
    vol: float = 1.0,                  # 音量 (0.0-2.0)
    pitch: int = 0,                    # 音调 (-12到12)
    emotion: str = "neutral"           # 情感
)

LLM (大语言模型)

minimax.LLM(
    model: str = "MiniMax-Text-01",     # 模型名称
    temperature: float = 0.7,          # 温度
    max_tokens: int = 2000,            # 最大token数
    system_prompt: str = None          # 系统提示词
)

❓ 常见问题

Q: 如何获取MiniMax的认证信息?

A: 请访问MiniMax控制台获取API密钥和Group ID。

Q: 支持哪些语音模型?

A: MiniMax支持多种语音模型,包括:

  • speech-01-turbo - 高品质语音合成
  • speech-01 - 标准语音合成
  • 其他MiniMax支持的语音模型

Q: 如何选择合适的语音ID?

A: 语音ID可在MiniMax文档中查看,包括:

  • female-tianmei - 女声天美
  • male-qn - 男声青年
  • 其他多种音色选择

Q: 支持哪些对话模型?

A: MiniMax支持多种对话模型:

  • MiniMax-Text-01 - 通用对话模型
  • 其他MiniMax系列对话模型

Q: 如何调整语音参数?

A: 可以通过以下参数调整语音效果:

  • speed: 控制语速,范围0.5-2.0
  • vol: 控制音量,范围0.0-2.0
  • pitch: 控制音调,范围-12到12
  • emotion: 设置情感,如neutral、happy、sad、angry

📝 更新日志

v1.2.9

  • 支持MiniMax语音合成和对话模型
  • 支持多种音色和情感表达
  • 完善的API文档和使用示例

🤝 贡献

欢迎提交 Issue 和 Pull Request!

📄 许可证

本项目采用 Apache 2.0 许可证。

🙏 致谢

  • LiveKit - 优秀的实时通信框架
  • MiniMax - 强大的AI服务提供商

Metadata

Release files for livekit-plugins-minimax 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for livekit-plugins-minimax 1.3.0
File Size Uploaded Provenance Actions
livekit_plugins_minimax-1.3.0.tar.gz 11.8 kB Without provenance Details for livekit_plugins_minimax-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for livekit-plugins-minimax 1.3.0
File Interpreter ABI Platform Actions
livekit_plugins_minimax-1.3.0-py3-none-any.whl Python 3 none any Details for livekit_plugins_minimax-1.3.0-py3-none-any.whl

Total release size: 24.2 kB

Release files / livekit_plugins_minimax-1.3.0.tar.gz

Download URL livekit_plugins_minimax-1.3.0.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
26fd7f1a06361dc31554b7ec52e7e4088cb6c17df73e9c8ab23278bee641f00e
BLAKE2b-256 checksum
How to use checksums
b6cdd4228e5956261059d16450a0f5a9b0968f816a66f538cb361d7605086a19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / livekit_plugins_minimax-1.3.0-py3-none-any.whl

Download URL livekit_plugins_minimax-1.3.0-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39c35f8c7fbda996c2d632a78373dc648edc8afb2a0e174bf2ce714a8628c881
BLAKE2b-256 checksum
How to use checksums
2d6704e0bc84069df8990f386300bdc4dc7fe239a11051545d3c98a68fd557e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for livekit-plugins-minimax 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page