Skip to content

Commit

Permalink
docs: Adding git attributes as well as updating wording
Browse files Browse the repository at this point in the history
docs: Adding git attributes as well as updating wording
  • Loading branch information
cyfyifanchen committed Nov 29, 2024
1 parent 69691f8 commit 6d72f5b
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 85 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Treat all text files as text and normalize to LF in the repository
* text=auto
# Force LF for shell scripts or config files
*.sh text eol=lf
*.config text eol=lf
57 changes: 30 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ Combining OpenAI Realtime API for ultra-low latency with RTC’s AI noise suppre
<h2>Usecases</h2>

![Usecases](https://github.com/TEN-framework/docs/blob/main/assets/jpg/usecases.jpg?raw=true)
<br>

<br>
<h2>TEN Agent Features</h2>

* **OpenAI Realtime API and RTC integration**:
TEN Agent is the world-class multimodal AI agent to integrate the OpenAI Realtime API and RTC.
* **OpenAI Realtime API and RTC Integration**:
TEN Agent seamlessly integrates OpenAI's Realtime API with RTC capabilities, enabling natural, responsive conversations with ultra-low latency and high-quality audio processing.

* **High-Performance Real-Time Multimodal Interactions**:
Offers high-performance, low-latency solutions for complex audio-visual AI applications.
Expand Down Expand Up @@ -79,35 +79,37 @@ Manages and adjusts agent behavior in real-time for dynamic responsiveness.

### Prerequisites

#### Keys
- Agora [ App ID ](https://docs.agora.io/en/video-calling/get-started/manage-agora-account?platform=web#create-an-agora-project) and [ App Certificate ](https://docs.agora.io/en/video-calling/get-started/manage-agora-account?platform=web#create-an-agora-project)(certificate only required if enabled in the Agora Console)
- [OpenAI](https://openai.com/index/openai-api/) API key
- [ Deepgram ](https://deepgram.com/) ASR and [ FishAudio ](https://fish.audio/) TTS
<!-- - Azure [SST(ASR)](https://azure.microsoft.com/en-us/products/ai-services/speech-to-text) and [TTS](https://azure.microsoft.com/en-us/products/ai-services/text-to-speech) API keys -->
| Category | Requirements |
|----------|-------------|
| **Keys** | • Agora [ App ID ](https://docs.agora.io/en/video-calling/get-started/manage-agora-account?platform=web#create-an-agora-project) and [ App Certificate ](https://docs.agora.io/en/video-calling/get-started/manage-agora-account?platform=web#create-an-agora-project)(free minutes every month) <br>• [OpenAI](https://openai.com/index/openai-api/) API key<br>• [ Deepgram ](https://deepgram.com/) ASR (free credits available with signup)<br>• [ FishAudio ](https://fish.audio/) TTS (free credits available with signup)|
| **Installation** |[Docker](https://www.docker.com/) / [Docker Compose](https://docs.docker.com/compose/)<br>• [Node.js(LTS) v18](https://nodejs.org/en) |
| **Minimum System Requirements** | • CPU >= 2 Core<br>• RAM >= 4 GB |

#### Installation
- [Docker](https://www.docker.com/) / [Docker Compose](https://docs.docker.com/compose/)
- [Node.js(LTS) v18](https://nodejs.org/en)
<!-- <br>
#### Minimum system requirements
- CPU >= 2 Core
- RAM >= 4 GB
### Windows settings(MUST READ)
#### MacOS: Docker setting on Apple Silicon
On Windows, Git automatically adds a carriage return(\r) at the end of each line, which causes the `agents/bin/start: not found` error when running the server.
You will need to uncheck "Use Rosetta for x86_64/amd64 emulation on Apple Silicon" option for Docker if you are on Apple Silicon. However, please note that build and connection times will be a little slower due to emulation when running on ARM systems. Once deployed to x64 (e.g. your Linux server) it will be much faster.
**If you encounter this issue**, follow these steps:
1. Completely remove the current project folder
2. Run the following command to disable Git's auto CRLF:
```bash
git config --global core.autocrlf false
``` -->

![Docker Setting](https://github.com/TEN-framework/docs/blob/main/assets/gif/docker_setting.gif?raw=true)
<!-- 3. Re-clone the project and start the process again -->

#### Windows: Configuring Git to handle line endings
To avoid problems in `task run` later, you can configure Git to properly handle line endings on Windows.([more here](https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings?platform=windows))
<br>

**Only do this if you are running into line-ending trouble.**
### macOS: Docker setting on Apple Silicon

```bash
git config --global core.autocrlf false
```
For Apple Silicon Macs, uncheck "Use Rosetta for x86/amd64 emulation" in Docker settings. Note: This may result in slower build times on ARM, but performance will be normal when deployed to x64 servers.

![Docker Setting](https://github.com/TEN-framework/docs/blob/main/assets/gif/docker_setting.gif?raw=true)

<br>

### Next step

Expand All @@ -122,8 +124,8 @@ cp ./.env.example ./.env
#### 2. Setup API keys
Open the `.env` file and fill in the `keys`. We recommend using [ Deepgram ASR ](https://deepgram.com/) and [ FishAudio TTS ](https://fish.audio/) as they are free to sign up for and offer free credits. Of course, you can also use other services, see the list in [.env.example](https://github.com/TEN-framework/ten-agent/blob/main/.env.example).
```bash
# Agora App ID
# Agora App Certificate(only required if enabled in the Agora Console)
# Agora App ID and Agora App Certificate
# These are enabled by default when you create an Agora project
AGORA_APP_ID=
AGORA_APP_CERTIFICATE=

Expand Down Expand Up @@ -172,7 +174,8 @@ Once you save the graph, you can return to [localhost:3000]( http://localhost:30

![TEN Graph Designer](https://github.com/TEN-framework/docs/blob/main/assets/gif/hello_world_python.gif?raw=true)

### How components work together in this repository
<br>
<h2>How components work together</h2>

![Components Diagram](https://raw.githubusercontent.com/TEN-framework/docs/refs/heads/main/assets/png/arc.png)

Expand All @@ -190,7 +193,7 @@ Before we get started, be sure to star our repository and get instant notificati
- [Discord](https://discord.gg/VnPftUzAMJ): Ideal for sharing your applications and engaging with the community.
- [GitHub Discussion](https://github.com/TEN-framework/ten-agent/discussions): Perfect for providing feedback and asking questions.
- [GitHub Issues](https://github.com/TEN-framework/ten-agent/issues): Best for reporting bugs and proposing new features. Refer to our [contribution guidelines](./docs/code-of-conduct/contributing.md) for more details.
- [X (formerly Twitter)](https://img.shields.io/twitter/follow/TenFramework?logo=X&color=%20%23f5f5f5): Great for sharing your agents and interacting with the community.
- [X](https://img.shields.io/twitter/follow/TenFramework?logo=X&color=%20%23f5f5f5): Great for sharing your agents and interacting with the community.


<br>
Expand Down
81 changes: 31 additions & 50 deletions docs/readmes/README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,70 +40,42 @@
</div>

<br>
<h2>🎉 TEN Agent 兼容了 OpenAI Realtime API 和 RTC</h2>
<h2>如何在本地构建 TEN Agent

OpenAI Realtime API 提供超低延迟,而 RTC 提供 AI 噪声抑制。TEN Agent 两者兼备。欢迎在 [agent.theten.ai](https://agent.theten.ai) 上体验。
### 先决条件

![TEN Agent with OpenAI Realtime API and RTC](https://github.com/TEN-framework/docs/blob/main/assets/gif/realtime-api.gif?raw=true)
| 类别 | 要求 |
|----------|-------------|
| **Keys** |[ App ID ](https://console.shengwang.cn)[ App Certificate ](https://console.shengwang.cn)[注册教程](https://doc.shengwang.cn/doc/console/general/quickstart#%E6%B3%A8%E5%86%8C%E8%B4%A6%E5%8F%B7)) <br>• [OpenAI](https://openai.com/index/openai-api/) API 密钥<br>• [ Deepgram ](https://deepgram.com/) ASR(注册即可获得免费额度)<br>• [ FishAudio ](https://fish.audio/) TTS(注册即可获得免费额度)|
| **安装要求** |[Docker](https://www.docker.com/) / [Docker Compose](https://docs.docker.com/compose/)<br>• [Node.js(LTS) v18](https://nodejs.org/en) |
| **最低系统要求** | • CPU >= 2核<br>• 内存 >= 4 GB |

<br>
<h2>TEN Agent 特性</h2>

**TEN Agent**,由世界首个实时多模态框架驱动。它是开源的,具有说话、视觉和访问知识库的能力。通过利用 TEN 框架,TEN Agent 具有以下特点:
<!-- ### Windows 和 macOS 设置
#### Windows 设置(必读)
1. **高性能实时多模态交互**
为复杂的音视频 AI 应用提供高性能、低延迟的解决方案。
强烈建议使用 [Git for Windows](https://git-scm.com/downloads/win) 来避免运行服务器时出现换行符问题。([详细信息](https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings?platform=windows))
2. **多语言和多平台支持**
支持 C++、Go、Python 等语言的扩展开发。可在 Windows、Mac、Linux 和移动设备上运行。
如果您更喜欢使用 Windows PowerShell,在遇到换行符问题时,请确保运行以下命令:
3. **边缘-云集成**
灵活结合边缘和云部署的扩展,平衡隐私、成本和性能。
**仅在遇到换行符问题时运行此命令。**
4. **超越模型限制的灵活性**
通过简单的拖放编程,轻松构建复杂的 AI 应用,集成音视频工具、数据库、RAG 等。

5. **实时代理状态管理**
实时管理和调整代理行为,实现动态响应。
```bash
git config --global core.autocrlf false
``` -->

<br>
#### macOS:Apple Silicon 上的 Docker 设置

<h2>点星收藏</h2>
对于 Apple Silicon Mac,请在 Docker 设置中取消勾选"使用 Rosetta 进行 x86/amd64 模拟"选项。注意:这可能会导致在 ARM 上的构建时间变慢,但部署到 x64 服务器时性能将恢复正常。

我们更新频繁,不想错过的话,请给我们的 repo 点星,以便获得第一时间的更新.

![TEN star us gif](https://github.com/TEN-framework/docs/blob/main/assets/gif/star_us_2.gif?raw=true)
![Docker 设置](https://github.com/TEN-framework/docs/blob/main/assets/gif/docker_setting.gif?raw=true)

<br>
<h2>如何在本地构建 TEN Agent

### 先决条件
#### Keys
- Agora App ID 和 App Certificate([大中华地区点击此处了解详情](https://doc.shengwang.cn/doc/rtc/android/get-started/enable-service)
- [OpenAI](https://openai.com/index/openai-api/) API Key
- [Deepgram](https://deepgram.com/) ASR API Key + [FishAudio](fish.audio) TTS API Key

#### 下载安装
- [Docker](https://www.docker.com/)[Docker Compose](https://docs.docker.com/compose/install/)
- [Node.js(LTS) v18](https://nodejs.org/en)
#### 机器配置
- CPU >= 2 Core
- RAM >= 4 GB

#### Apple Silicon 上 Docker 设置
如果您使用的是 Apple Silicon Mac,您需要取消勾选 Docker 的 "Use Rosetta for x86_64/amd64 emulation on Apple Silicon" 选项,否则服务器将无法正常工作。

<div align="center">

![Docker Setting](https://github.com/TEN-framework/docs/blob/main/assets/gif/docker_setting.gif?raw=true)

</div>


#### 设置国内代理

如果在国内,我们强烈建议在 SSH 中把代理打开,下载和安装的依赖的时候会更加丝滑。

如果在国内,我们强烈建议在 SSH 中把代理打开,下载和安装的依赖的时候会更加丝滑。如果遇到更多问题,请参考 [问题排查](../troubleshooting/troubleshooting-cn.md)

```bash
# 如果用的代理软件没有增强模式的话, 建议手动把所有代理协议都打开
Expand All @@ -124,6 +96,8 @@ export GOPROXY=https://goproxy.cn,direct
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
```

<br>

### 下一步
#### 1. 创建配置文件
克隆项目后,在根目录下跑下面的命创建 `.env`:
Expand All @@ -134,8 +108,8 @@ cp ./.env.example ./.env
#### 2. 绑定 extension 的 keys
打开 `.env` 文件,绑定对应的 `keys`:
```
# Agora App ID
# Agora App Certificate 非必须,只有在申请 Agora app ID 的时候开通了才需要填
# Agora App ID 和 Agora App Certificate
# 当在账户里面创建项目的时候,默认自动开启 App ID 和 App Certificate
AGORA_APP_ID=
AGORA_APP_CERTIFICATE=
Expand Down Expand Up @@ -179,6 +153,13 @@ task run

![TEN Graph Designer](https://github.com/TEN-framework/docs/blob/main/assets/gif/graph_designer.gif?raw=true)

<br>
<h2>点星收藏</h2>

我们更新频繁,不想错过的话,请给我们的 repo 点星,以便获得第一时间的更新.

![TEN star us gif](https://github.com/TEN-framework/docs/blob/main/assets/gif/star_us_2.gif?raw=true)

<br>
<h2>加入社区</h2>

Expand All @@ -201,4 +182,4 @@ task run
<br>
<h2>许可证授权</h2>

本项目使用 Apache 2.0 许可证授权 - 详细信息请参阅 [LICENSE](LICENSE)
本项目使用 Apache 2.0 许可证授权 - 详细信息请参阅 [LICENSE](../../LICENSE)
9 changes: 1 addition & 8 deletions docs/troubleshooting/troubleshooting-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,4 @@ curl www.google.com
<h1>301 Moved Permanently</h1>
</body>
</html>
```

## 遇到 /app/agents/bin/start: not found 错误怎么办?

1. 有可能是权限的问题,所以可以 `cd /app/agents/bin/start` 过去,看下文件是否存在。
如果存在,可以尝试 `chmod +x start` 赋予权限。

1. 如果 `cd /app/agents/bin/start` 文件不存在, 有可能是因为 Windows line-ending 的问题,可以尝试 `git config --global core.autocrlf true` 来解决。 然后再重新 clone 代码。
```

0 comments on commit 6d72f5b

Please sign in to comment.