Skip to content

Commit 74690dd

Browse files
committed
docs: Update README files for improved clarity and consistency in formatting, including TTS provider details and service region options
1 parent 3a2f276 commit 74690dd

File tree

4 files changed

+96
-116
lines changed

4 files changed

+96
-116
lines changed

agora-rest-client-core/src/main/java/io/agora/rest/services/convoai/README.md

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,25 @@ Agora's Conversational AI Engine redefines human-computer interaction, breaking
88

99
## Environment Setup
1010

11-
- Obtain Agora App ID -------- [Agora Console](https://console.agora.io/v2)
11+
- Obtain Agora App ID -------- [Agora Console](https://console.agora.io/v2)
1212

13-
> - Click Create Application
14-
>
15-
> ![](../../../../../../../../../assets/imges/EN/create_app_1.png)
16-
>
17-
> - Select the type of application you want to create
18-
>
19-
> ![](../../../../../../../../../assets/imges/EN/create_app_2.png)
13+
> - Click Create Application
14+
>
15+
> ![](../../../../../../../../../assets/imges/EN/create_app_1.png)
16+
>
17+
> - Select the type of application you want to create
18+
>
19+
> ![](../../../../../../../../../assets/imges/EN/create_app_2.png)
2020
21-
- Obtain App Certificate ----- [Agora Console](https://console.agora.io/v2)
21+
- Obtain App Certificate ----- [Agora Console](https://console.agora.io/v2)
2222

23-
> In the project management page of the Agora Console, find your project and click Configure.
24-
> ![](../../../../../../../../../assets/imges/EN/config_app.png)
25-
> Click the copy icon under Primary Certificate to obtain the App Certificate for your project.
26-
> ![](../../../../../../../../../assets/imges/EN/copy_app_cert.png)
27-
28-
- Enable Conversational AI Engine Service ----- [Enable Service](https://docs.agora.io/en/conversational-ai/get-started/manage-agora-account)
29-
> ![](../../../../../../../../../assets/imges/EN/open_convo_ai.png)
23+
> In the project management page of the Agora Console, find your project and click Configure.
24+
> ![](../../../../../../../../../assets/imges/EN/config_app.png)
25+
> Click the copy icon under Primary Certificate to obtain the App Certificate for your project.
26+
> ![](../../../../../../../../../assets/imges/EN/copy_app_cert.png)
3027
28+
- Enable Conversational AI Engine Service ----- [Enable Service](https://docs.agora.io/en/conversational-ai/get-started/manage-agora-account)
29+
> ![](../../../../../../../../../assets/imges/EN/open_convo_ai.png)
3130
3231
## API Definition
3332

@@ -52,32 +51,33 @@ For more api details, please refer to the [API Documentation](https://docs.agora
5251
domainArea(DomainArea.CN).
5352
// Specify the service region. Options include ChineseMainlandServiceRegion, GlobalServiceRegion.
5453
// ChineseMainlandServiceRegion and GlobalServiceRegion are two different services.
55-
serverRegion(ConvoAIServiceRegionEnum.CHINESE_MAINLAND).
54+
serverRegion(ConvoAIServiceRegionEnum.GLOBAL).
5655
build();
5756

5857
ConvoAIClient convoAIClient = ConvoAIClient.create(config);
5958
```
6059

6160
### Create Conversational Agent
62-
>
61+
6362
> Create a Conversational AI agent instance and join an RTC channel.
6463
6564
Parameters to set: LLM, TTS, and Agent related parameters.
6665

67-
Call the `join` method to create a conversational agent, using Bytedance TTS as an example:
66+
Call the `join` method to create a conversational agent, using Microsoft TTS as an example:
6867

6968
```java
69+
public static final String APP_ID = "<your appId>";
70+
public static final String CNAME = "<your cname>";
7071
public static final String AGENT_RTC_UID = "<your agent rtc uid>";
7172
public static final String AGENT_RTC_TOKEN = "<your agent rtc token>";
7273

7374
public static final String LLM_URL = "<your llm url>";
7475
public static final String LLM_API_KEY = "<your llm api key>";
7576
public static final String LLM_MODEL = "<your llm model>";
7677

77-
public static final String TTS_BYTEDANCE_TOKEN = "<your bytedance tts token>";
78-
public static final String TTS_BYTEDANCE_APP_ID = "<your bytedance tts app id>";
79-
public static final String TTS_BYTEDANCE_CLUSTER = "<your bytedance tts cluster>";
80-
public static final String TTS_BYTEDANCE_VOICE_TYPE = "<your bytedance tts voice type>";
78+
public static final String TTS_MICROSOFT_TOKEN = "<your microsoft tts token>";
79+
public static final String TTS_MICROSOFT_REGION = "<your microsoft tts region>";
80+
public static final String TTS_MICROSOFT_VOICE_NAME = "<your microsoft tts voice name>";
8181

8282
// Start agent
8383
String name = APP_ID + ":" + CNAME;
@@ -124,17 +124,15 @@ Call the `join` method to create a conversational agent, using Bytedance TTS as
124124
.greetingMessage("Hello,how can I help you?")
125125
.build())
126126
.ttsPayload(JoinConvoAIReq.TTSPayload.builder()
127-
.vendor(JoinConvoAIReq.TTSVendorEnum.BYTEDANCE)
128-
.params(JoinConvoAIReq.BytedanceTTSVendorParams.builder().
129-
token(TTS_BYTEDANCE_TOKEN).
130-
cluster(TTS_BYTEDANCE_CLUSTER).
131-
voiceType(TTS_BYTEDANCE_VOICE_TYPE).
132-
appId(TTS_BYTEDANCE_APP_ID).
133-
speedRatio(1.0F).
134-
volumeRatio(1.0F).
135-
pitchRatio(1.0F).
136-
emotion("happy").
137-
build())
127+
.vendor(JoinConvoAIReq.TTSVendorEnum.MICROSOFT)
128+
.params(JoinConvoAIReq.MicrosoftTTSVendorParams.builder()
129+
.key(TTS_MICROSOFT_TOKEN)
130+
.region(TTS_MICROSOFT_REGION)
131+
.voiceName(TTS_MICROSOFT_VOICE_NAME)
132+
.speed(1.0F)
133+
.volume(70F)
134+
.sampleRate(24000)
135+
.build())
138136
.build())
139137
.vadPayload(JoinConvoAIReq.VADPayload.builder()
140138
.interruptDurationMs(160)
@@ -169,7 +167,8 @@ Call the `join` method to create a conversational agent, using Bytedance TTS as
169167
> Stop the conversational agent and leave the RTC channel.
170168
171169
Parameters to set:
172-
- AgentId returned by the `join` interface
170+
171+
- AgentId returned by the `join` interface
173172

174173
```java
175174
// Stop the agent
@@ -188,8 +187,9 @@ Parameters to set:
188187
> Currently, only the Token information of a running conversational agent can be updated.
189188
190189
Parameters to set:
191-
- AgentId returned by the `join` interface
192-
- Token to be updated
190+
191+
- AgentId returned by the `join` interface
192+
- Token to be updated
193193

194194
```java
195195
// Update agent
@@ -214,7 +214,8 @@ Parameters to set:
214214
> Query the status of the conversational agent.
215215
216216
Parameters to set:
217-
- AgentId returned by the `join` interface
217+
218+
- AgentId returned by the `join` interface
218219

219220
```java
220221
// Query agent
@@ -237,13 +238,13 @@ Parameters to set:
237238
logger.info("Query the agent successfully, queryConvoAIRes:{}", queryConvoAIRes);
238239
```
239240

240-
241241
## Retrieves a list of agents
242242

243243
> Retrieves a list of agents that meet the specified criteria.
244244
245245
Parameters to set:
246-
- AgentId returned by the `join` interface
246+
247+
- AgentId returned by the `join` interface
247248

248249
```java
249250
// List agent
@@ -270,4 +271,5 @@ Parameters to set:
270271
```
271272

272273
## Error Codes and Response Status Codes Handling
274+
273275
For specific business response codes, please refer to the [Business Response Codes](https://docs.agora.io/en/conversational-ai/rest-api/reference) documentation.

agora-rest-client-core/src/main/java/io/agora/rest/services/convoai/README_ZH.md

Lines changed: 39 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
# 对话式 AI 引擎服务
22

3-
[English](./README.md) | 简体中文
3+
[English](./README.md) | 简体中文
44

55
## 服务概述
66

77
声网对话式 AI 引擎重新定义了人机交互界面,突破了传统文字交互,实现了高拟真、自然流畅的实时语音对话,让 AI 真正“开口说话”。适用于智能助手、情感陪伴、口语陪练、智能客服、智能硬件、沉浸式游戏 NPC 等创新场景。
88

99
## 环境准备
1010

11-
- 获取声网App ID -------- [声网Agora - 文档中心 - 如何获取 App ID](https://docs.agora.io/cn/Agora%20Platform/get_appid_token?platform=All%20Platforms#%E8%8E%B7%E5%8F%96-app-id)
11+
- 获取声网 App ID -------- [声网 Agora - 文档中心 - 如何获取 App ID](https://docs.agora.io/cn/Agora%20Platform/get_appid_token?platform=All%20Platforms#%E8%8E%B7%E5%8F%96-app-id)
1212

13-
> - 点击创建应用
14-
>
15-
> ![](../../../../../../../../../assets/imges/CN/create_app_1.png)
16-
>
17-
> - 选择你要创建的应用类型
18-
>
19-
> ![](../../../../../../../../../assets/imges/CN/create_app_2.png)
13+
> - 点击创建应用
14+
>
15+
> ![](../../../../../../../../../assets/imges/CN/create_app_1.png)
16+
>
17+
> - 选择你要创建的应用类型
18+
>
19+
> ![](../../../../../../../../../assets/imges/CN/create_app_2.png)
2020
21-
- 获取App 证书 ----- [声网Agora - 文档中心 - 获取 App 证书](https://docs.agora.io/cn/Agora%20Platform/get_appid_token?platform=All%20Platforms#%E8%8E%B7%E5%8F%96-app-%E8%AF%81%E4%B9%A6)
21+
- 获取 App 证书 ----- [声网 Agora - 文档中心 - 获取 App 证书](https://docs.agora.io/cn/Agora%20Platform/get_appid_token?platform=All%20Platforms#%E8%8E%B7%E5%8F%96-app-%E8%AF%81%E4%B9%A6)
2222

23-
> 在声网控制台的项目管理页面,找到你的项目,点击配置。
24-
> ![](../../../../../../../../../assets/imges/CN/config_app.png)
25-
> 点击主要证书下面的复制图标,即可获取项目的 App 证书。
26-
> ![](../../../../../../../../../assets/imges/CN/copy_app_cert.png)
23+
> 在声网控制台的项目管理页面,找到你的项目,点击配置。
24+
> ![](../../../../../../../../../assets/imges/CN/config_app.png)
25+
> 点击主要证书下面的复制图标,即可获取项目的 App 证书。
26+
> ![](../../../../../../../../../assets/imges/CN/copy_app_cert.png)
2727
28-
- 启用会话式AI引擎服务 ----- [启用服务](https://doc.shengwang.cn/doc/convoai/restful/get-started/enable-service)
29-
> ![](../../../../../../../../../assets/imges/CN/open_convo_ai.png)
28+
- 启用会话式 AI 引擎服务 ----- [启用服务](https://doc.shengwang.cn/doc/convoai/restful/get-started/enable-service)
29+
> ![](../../../../../../../../../assets/imges/CN/open_convo_ai.png)
3030
31-
## API定义
31+
## API 定义
3232

33-
更多API详情,请参考 [API文档](https://doc.shengwang.cn/api-ref/convoai/java/java-api/overview)
33+
更多 API 详情,请参考 [API 文档](https://doc.shengwang.cn/api-ref/convoai/java/java-api/overview)
3434

35-
## API调用示例
35+
## API 调用示例
3636

37-
### 初始化会话式AI引擎客户端
37+
### 初始化会话式 AI 引擎客户端
3838

3939
```java
4040
public static final String APP_ID = "<your appId>";
@@ -58,14 +58,16 @@
5858
```
5959

6060
### 创建对话式智能体
61-
>
62-
> 创建对话式 AI 智能体实例并加入RTC频道。
6361

64-
需要设置的参数:LLM、TTS和代理相关参数
62+
> 创建对话式 AI 智能体实例并加入 RTC 频道
6563
66-
调用`join`方法创建会话代理,以使用字节跳动TTS为例:
64+
需要设置的参数:LLM、TTS 和代理相关参数。
65+
66+
调用`join`方法创建会话代理,以使用字节跳动 TTS 为例:
6767

6868
```java
69+
public static final String APP_ID = "<your appId>";
70+
public static final String CNAME = "<your cname>";
6971
public static final String AGENT_RTC_UID = "<your agent rtc uid>";
7072
public static final String AGENT_RTC_TOKEN = "<your agent rtc token>";
7173

@@ -165,10 +167,11 @@
165167

166168
### 停止对话式智能体
167169

168-
> 停止对话式智能体并离开RTC频道
170+
> 停止对话式智能体并离开 RTC 频道
169171
170172
需要设置的参数:
171-
- `join`接口返回的AgentId
173+
174+
- `join`接口返回的 AgentId
172175

173176
```java
174177
// Stop the agent
@@ -184,11 +187,12 @@
184187

185188
### 更新智能体配置
186189

187-
> 目前只能更新正在运行的智能体的Token信息
190+
> 目前只能更新正在运行的智能体的 Token 信息
188191
189192
需要设置的参数:
190-
- `join`接口返回的AgentId
191-
- 要更新的Token
193+
194+
- `join`接口返回的 AgentId
195+
- 要更新的 Token
192196

193197
```java
194198
// Update agent
@@ -213,7 +217,8 @@
213217
> 查询智能体的状态。
214218
215219
需要设置的参数:
216-
- `join`接口返回的AgentId
220+
221+
- `join`接口返回的 AgentId
217222

218223
```java
219224
// Query agent
@@ -236,12 +241,13 @@
236241
logger.info("Query the agent successfully, queryConvoAIRes:{}", queryConvoAIRes);
237242
```
238243

239-
240244
## 检索智能体列表
245+
241246
> 按照条件检索智能体列表。
242247
243248
需要设置的参数:
244-
- `join`接口返回的AgentId
249+
250+
- `join`接口返回的 AgentId
245251

246252
```java
247253
// List agent
@@ -268,4 +274,5 @@
268274
```
269275

270276
## 错误代码和响应状态代码处理
277+
271278
有关具体的业务响应代码,请参考 [业务响应代码](https://doc.shengwang.cn/doc/convoai/restful/api/response-code) 文档。

examples/convoai/README.md

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,6 @@ You can find the relevant parameters in the [Conversational AI Service Documenta
2121

2222
When choosing different TTS providers, you need to configure additional environment variables. The currently supported TTS providers are:
2323

24-
### bytedance
25-
26-
```bash
27-
export CONVOAI_TTS_BYTEDANCE_TOKEN=<Your tts bytedance token>
28-
export CONVOAI_TTS_BYTEDANCE_APP_ID=<Your tts bytedance app id>
29-
export CONVOAI_TTS_BYTEDANCE_CLUSTER=<Your tts bytedance cluster>
30-
export CONVOAI_TTS_BYTEDANCE_VOICE_TYPE=<Your tts bytedance voice type>
31-
```
32-
33-
### tencent
34-
35-
```bash
36-
export CONVOAI_TTS_TENCENT_APP_ID=<Your tts tencent app id>
37-
export CONVOAI_TTS_TENCENT_SECRET_ID=<Your tts tencent secret id>
38-
export CONVOAI_TTS_TENCENT_SECRET_KEY=<Your tts tencent secret key>
39-
```
40-
41-
### minimax
42-
43-
```bash
44-
export CONVOAI_TTS_MINIMAX_GROUP_ID=<Your tts minimax group id>
45-
export CONVOAI_TTS_MINIMAX_GROUP_KEY=<Your tts minimax group key>
46-
export CONVOAI_TTS_MINIMAX_GROUP_MODEL=<Your tts minimax group model>
47-
```
48-
4924
### microsoft
5025

5126
```bash
@@ -73,11 +48,12 @@ make install
7348
Then, in the current module, execute the following commands to experience different scenarios of the `ConvoAI` example:
7449

7550
```bash
76-
mvn exec:java -Dexec.mainClass="io.agora.rest.examples.convoai.Main" -Dexec.args="--ttsVendor=<ttsVendor> --serviceRegion=<serviceRegion>"
51+
mvn exec:java -Dexec.mainClass="io.agora.rest.examples.convoai.Main" -Dexec.args="--ttsVendor=<ttsVendor> --serviceRegion=global"
7752
```
7853

79-
`ttsVendor` represents different TTS providers. Choose the appropriate TTS provider based on your requirements.
80-
`serviceRegion` represents the chosen service region. The currently supported service regions are:
81-
* `chineseMainland`
82-
* `global`
54+
`ttsVendor` represents different TTS providers.
55+
56+
- `microsoft`
57+
- `elevenLabs`
8358

59+
Choose the appropriate TTS provider based on your requirements.

0 commit comments

Comments
 (0)