TEN 是一个全面的开放源代码生态系统,用于创建、定制和部署具有多模态功能(包括语音、视觉和虚拟形象交互)的实时对话 AI 代理。
TEN 是一个全面的开放源代码生态系统,用于创建、定制和部署具有多模态功能(包括语音、视觉和虚拟形象交互)的实时对话 AI 代理。TEN 包含 TEN 框架、TEN 话话检测、TEN 语音活动检测、TEN 智能体、TMAN 设计器和 TEN 门户。
一、软件介绍
文末提供程序和源码下载
TEN 是一个全面的开放源代码生态系统,用于创建、定制和部署具有多模态功能(包括语音、视觉和虚拟形象交互)的实时对话 AI 代理。TEN 包含 TEN 框架、TEN 话话检测、TEN 语音活动检测、TEN 智能体、TMAN 设计器和 TEN 门户。
二、功能
1️⃣ 实时虚拟形象
使用 TEN Agent 和 Trulience 提供的丰富多样的免费虚拟形象选项,构建引人入胜的 AI 虚拟形象。要使其运行起来,您只需要两步:
- Follow the README to finish setting up and running the Playground
按照 README 完成设置并运行 Playground - Enter the avatar ID and token you get from Trulience
输入您从 Trulience 获取的头像 ID 和令牌
2️⃣ 实时语音与 MCP 服务器
TEN Agent 现已与 MCP 服务器无缝集成,扩展了其 LLM 功能。开始使用方法:
- Open the Module Picker in Playground
在 Playground 中打开模块选择器 - Add the MCP server tool for LLM integration
添加用于 LLM 集成的 MCP 服务器工具 - Paste a URL from your MCP server in the extension
在扩展中粘贴您 MCP 服务器的 URL - Start a realtime conversation with TEN Agent
与 TEN Agent 开始实时对话
This integration allows you to leverage MCP's diverse servers offerings while maintaining TEN Agent's powerful conversational abilities.
此集成允许您利用 MCP 的多样化服务器服务,同时保持 TEN Agent 强大的对话能力。
3️⃣ 与硬件进行实时通信
TEN Agent is now running on the Espressif ESP32-S3 Korvo V3 development board, an excellent way to integrate realtime communication with LLM on hardware.
TEN Agent 现在在 Espressif ESP32-S3 Korvo V3 开发板上运行,这是将实时通信与 LLM 集成到硬件上的绝佳方式。
4️⃣ 实时视觉和实时屏幕共享检测
Try Google Gemini Multimodal Live API with realtime vision and realtime screenshare detection capabilities, it is a ready-to-use extension, along with powerful tools like Weather Check and Web Search integrated perfectly into TEN Agent.
尝试使用 Google Gemini Multimodal Live API,它具备实时视觉和实时屏幕共享检测功能,是一个即用型扩展,并且像天气检查和网页搜索等强大工具已完美集成到 TEN Agent 中。
5️⃣ TEN 与其它 LLM 平台
TEN offers a great support to make the realtime interactive experience even better on other LLM platform as well, check out docs for more.
TEN 为在其他 LLM 平台上实现更佳的实时交互体验提供了强大的支持
6️⃣ StoryTeller - TEN 图像生成
Experience the real-time image generation with StoryTeller, it is a ready-to-use extension, along with powerful tools like Weather Check and Web Search integrated perfectly into TEN.
体验 StoryTeller 的实时图像生成功能,它是一个即用型扩展,并完美集成到 TEN 中,包括强大的工具如天气检查和网页搜索。
三、启动 TEN 代理
🅰️ Run TEN Agent in localhost
🅰️ 在本地运行 TEN 代理
Step ⓵ - Prerequisites 步骤⓵ - 前置条件
Category 分类 | Requirements 需求 |
---|---|
Keys 密钥 | • Agora App ID and App Certificate (free minutes every month) • Agora 应用 ID 和应用证书(每月免费分钟数) • OpenAI API key (any LLM that is compatible with OpenAI) • OpenAI API 密钥(任何与 OpenAI 兼容的 LLM) • Deepgram ASR (free credits available with signup) • Deepgram 语音识别(注册即可获得免费额度) • Elevenlabs TTS (free credits available with signup) • Elevenlabs 语音合成(注册即可获得免费额度) |
Installation 安装 | • Docker / Docker Compose • Node.js(LTS) v18 |
Minimum System Requirements 最低系统要求 |
• CPU >= 2 Core • RAM >= 4 GB |
Note 注意
macOS: Docker setting on Apple Silicon
macOS: 在 Apple Silicon 上的 Docker 设置
Uncheck "Use Rosetta for x86/amd64 emulation" in Docker settings, it may result in slower build times on ARM, but performance will be normal when deployed to x64 servers.
在 Docker 设置中取消勾选"使用 Rosetta 进行 x86/amd64 模拟",这可能会导致在 ARM 架构上构建时间变慢,但在部署到 x64 服务器时性能将是正常的。
Step ⓶ - Build agent in VM
步骤⓶ - 在虚拟机中构建代理
1. Clone down the repo,cd
to ai-agents
and create .env
file from .env.example
1. 克隆仓库,从 cd
到 ai-agents
,并从 .env.example
创建 .env
文件
cd ai_agents
cp ./.env.example ./.env
2. Setup Agora App ID and App Certificate in .env
2. 设置 Agora App ID 和 App 证书在 .env
AGORA_APP_ID=
AGORA_APP_CERTIFICATE=
3. Start agent development containers
3. 启动代理开发容器
docker compose up -d
4. Enter container 4. 进入容器
docker exec -it ten_agent_dev bash
5. Build agent with the default graph
( ~5min - ~8min)
5. 使用默认的 graph
构建代理(~5 分钟 - ~8 分钟)
check the /examples
folder for more examples
检查 /examples
文件夹以获取更多示例
# use the chained voice assistant
task use AGENT=voice-assistant
# or use the speech-to-speech voice assistant realtime
task use AGENT=voice-assistant-realtime
6. Start the web server
6. 启动 Web 服务器
# run task build if you changed any local source code, this is necessary if you are working on languages which require compilation like TypeScript or Golang.
task build
task run
Step ⓷ - Customize your agent with TMAN Designer
步骤 5 - 使用 TMAN Designer 定制您的智能体
- Open localhost:49483. 打开 localhost:49483。
- Right-click on the STT, LLM, and TTS extensions.
右键点击 STT、LLM 和 TTS 扩展。 - Open their properties and enter APIs respectively.
打开它们的属性并分别输入 API。 - Right-click the canvas and select 'Manage Apps' to open the Apps Manager.
右键点击画布并选择“管理应用”以打开应用管理器。 - Right under the Actions, click the ▶ to run the App.
在 Actions 下方,点击▶运行 App。 - Check the 'Run with TEN Agent' option and click the Run button.
检查"使用 TEN Agent 运行"选项,然后点击运行按钮。
🅱️ 在 Codespace 中运行 TEN Agent(无需 docker)
GitHub offers free Codespace for each repository, you can run the playground in Codespace without using Docker.Also, the speed of Codespace is much faster than localhost.
GitHub 为每个仓库提供免费的 Codespace,您可以在 Codespace 中运行游乐场而无需使用 Docker。此外,Codespace 的速度比本地主机快得多。
四、TEN Agent 自托管
使用 Docker 部署
一旦您已自定义您的代理(无论是使用 TMAN 管理器、Playground 还是直接编辑 property.json
),您可以通过为您的服务创建一个发布 Docker 镜像来部署它。
本文信息来源于GitHub作者地址:https://github.com/TEN-framework/ten-framework
更多推荐
所有评论(0)