🎬 演讲室MCP
 
与Speechlab AI配音平台交互的通用AI兼容接口
🔍 概述
Speechlab MCP是一个多功能界面,使AI助手能够与Speechlab AI配音平台进行交互。该工具弥补了自然语言指令和Speechlab API之间的差距,实现了无缝配音操作。
Your Content → 🤖 AI + Speechlab MCP → 🎙️ Professional Dubbing → 🌎 Global Audiences🧠 多平台支持
此软件包设计用于:
- ✅ 克劳德桌面 (直接插件集成)
- ✅ 光标编辑器 (通过Cursor的AI助手)
- ✅ Anthropic API应用程序 (通过函数调用)
- ✅ LangChain应用程序 (作为代理流中的工具)
- ✅ 任何LLM申请 具有API访问权限
🚀 快速开始
# Option 1: Use our interactive setup script
python setup_speechlab_mcp.py
# Option 2: Manual installation
pip install git+https://github.com/speechlab/speechlab-mcp.git
python -m speechlab_mcp --api-key YOUR_API_KEY📋 特性
- 🎬 项目管理:创建和管理配音项目
- 🎙️ 语言支持:支持20多种语言和近300种语言对
- 🔄 工作流程自动化:自动化从创建到下载的整个配音过程
- 📊 状态监测:实时进度跟踪和状态更新
- 🔗 共享能力:生成可共享的协作链接
- 🧩 人工智能集成:与人工智能助手和工作流程无缝集成
🛠️ 详细安装
先决条件
- Python 3.8或更高版本
- Speechlab API密钥
- 用于Claude集成:Claude桌面应用程序
- 对于其他集成:您首选的支持AI的应用程序
从源代码安装
- 克隆存储库:
git clone https://github.com/speechlab/speechlab-mcp.git
cd speechlab-mcp- 运行安装脚本(推荐):
python setup_speechlab_mcp.py或手动安装:
pip install .- 配置Claude集成(如果使用安装脚本,则会自动完成):
python -m speechlab_mcp --api-key YOUR_API_KEY或者,如果在.env文件中有API密钥:
# Create a .env file in the current directory
echo "SPEECHLAB_API_KEY=your_api_key_here" > .env
# Then run the configuration
python -m speechlab_mcp🔌 API配置
Speechlab MCP插件连接到Speechlabneneneba API。默认情况下,它使用 http://localhost/v1 作为API基本URL,但您可以对其进行配置:
# Configure with custom API URL
python -m speechlab_mcp --api-key YOUR_API_KEY --base-url https://api.speechlab.ai/v1🤖 集成方法
克劳德桌面
一旦安装为Claude插件,您就可以使用自然语言与Speechlab进行交互:
Create a new dubbing project named "Product Demo Video" with English as the source language and Spanish as the target language.光标编辑器集成
使用Cursor的AI助手时:
- 在您的项目中参考Speechlab MCP包
- 要求Cursor AI使用该包执行配音操作:
Using the Speechlab MCP package, can you create a new dubbing project for my video file at ./videos/demo.mp4 with English to Japanese translation?看 examples/cursor_integration.md 详细说明。
API集成(Python)
from speechlab_mcp.server import create_project_and_dub, start_dubbing, check_dubbing_status
# Create a new project
project_id = create_project_and_dub(
name="API Demo",
source_language="en",
target_language="fr"
)
# Upload media and start dubbing
upload_media(project_id, "/path/to/video.mp4")
start_dubbing(project_id)
# Check status
status = check_dubbing_status(project_id)看 examples/integration.example.py 举一个完整的例子。
LangChain集成
from langchain.agents import Tool
from speechlab_mcp.server import create_project_and_dub, check_dubbing_status
tools = [
Tool(
name="CreateDubbingProject",
func=lambda x: create_project_and_dub(name=x['name'], source_language=x['source'], target_language=x['target']),
description="Create a dubbing project with Speechlab"
),
Tool(
name="CheckDubbingStatus",
func=lambda x: check_dubbing_status(project_id=x),
description="Check the status of a dubbing project"
)
]
# Use these tools in your LangChain agent看 examples/langchain_agent.example.py 举一个完整的例子。
人类API集成
# Define Speechlab tools for Claude
TOOLS = [
{
"name": "create_project_and_dub",
"description": "Create a new dubbing project with Speechlab",
"input_schema": {
"type": "object",
"properties": {
"name": {"type": "string"},
"source_language": {"type": "string"},
"target_language": {"type": "string"}
},
"required": ["name", "source_language", "target_language"]
}
}
]
# Use with Anthropic's client
response = client.messages.create(
model="claude-3-opus-20240229",
max_tokens=1024,
messages=[{"role": "user", "content": "Create a dubbing project for my product video"}],
tools=TOOLS
)看 examples/anthropic_api.example.py 举一个完整的例子。
📱 使用示例
创建配音项目
Create a new dubbing project named "Product Demo Video" with English as the source language and Spanish as the target language.上传媒体
Upload the file at /Users/username/Videos/product_demo.mp4 to project ID abc123.开始配音过程
Start the dubbing process for project ID abc123.检查状态
Check the status of the dubbing process for project ID abc123.下载结果
Download the completed dubbed video for project ID abc123 to my Desktop.生成共享链接
Generate a sharing link for project ID abc123 so I can share it with my team.✨ 为什么这很重要
🌍 打破语言障碍
通过将人工智能助手直接连接到配音技术,Speechlab MCP实现了全球通信的民主化。通过简单的自然语言请求,您的内容可以通过专业质量的配音接触到国际观众。
⚡ 工作流加速
传统的配音过程既复杂又耗时。使用Speechlab MCP,您可以:
- 将配音项目设置时间从数小时缩短到数秒
- 通过简单的人工智能指令自动化重复性任务
- 无需登录单独的仪表板即可监控项目
- 通过简单的命令与利益相关者分享结果
🧠 AI原生集成
随着人工智能成为创意工作流程的核心部分,工具需要与人工智能兼容。Speechlab MCP从头开始设计,供人类和人工智能系统使用,在语言模型和专业配音服务之间架起了一座经得起未来考验的桥梁。
🔐 高级配置
该插件支持多种配置选项:
- 使用命令行参数:
python -m speechlab_mcp --api-key YOUR_API_KEY- 设置环境变量:
export SPEECHLAB_API_KEY=YOUR_API_KEY
python -m speechlab_mcp- 使用当前目录中的.env文件:
SPEECHLAB_API_KEY=YOUR_API_KEY
SPEECHLAB_API_BASE_URL=https://api.speechlab.ai/v1 # Optional
SPEECHLAB_MCP_BASE_PATH=~/speechlab-files # Optional, for file operations🧩 API功能
Speechlab MCP插件提供以下核心功能:
- 项目管理:创建、检索和列出配音项目
- 媒体处理:将源媒体文件上载到项目
- 配音操作:启动配音流程并监控状态
- 结果管理:下载已完成的配音文件
- 协作:为团队访问生成共享链接
📚 示例代码库
这 examples/ 目录包含各种集成方法的示例代码:
- examples/integration.example.py:直接Python集成
- examples/langchain_agent.example.py:LangChain代理集成
- examples/anthropic_api.example.py:人类API集成
- examples/cursor_integration.md:游标编辑器集成指南
❓ 故障排除
- 身份验证问题:请确保您的API密钥正确并且具有必要的权限。
- 文件上传问题:验证文件路径是否存在,以及文件是否为支持的媒体格式。
- 状态检查失败:项目ID可能不正确,或者项目可能已被删除。
📄 许可证
此项目根据MIT许可证获得许可-有关详细信息,请参阅许可证文件。
