Skip to content

Commit f863d3e

Browse files
authored
Merge pull request #47 from seymourtang/README
chore: Update README files for clarity and consistency, removing outdated TTS provider information and enhancing service region descriptions
2 parents 35e09fc + 784ba81 commit f863d3e

File tree

4 files changed

+60
-91
lines changed

4 files changed

+60
-91
lines changed

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
@@ -67,11 +42,12 @@ export CONVOAI_TTS_ELEVENLABS_VOICE_ID=<Your tts elevenLabs voice id>
6742
Run the sample project with the following command:
6843

6944
```bash
70-
go run main.go --ttsVendor=<ttsVendor> --serviceRegion=<serviceRegion>
45+
go run main.go --ttsVendor=<ttsVendor> --serviceRegion=2
7146
```
7247

73-
`ttsVendor` represents different TTS providers. Choose the appropriate TTS provider based on your requirements.
74-
`serviceRegion` represents chosen service region. The currently supported service regions are:
75-
* `1`:`ChineseMainland`
76-
* `2`:`Global`
48+
`ttsVendor` represents different TTS providers, currently supported TTS providers are:
49+
50+
- `microsoft`
51+
- `elevenLabs`
7752

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

examples/convoai/README_ZH.md

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

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

55
> 这是一个对话式 AI 引擎的示例项目,利用对话式 AI 引擎 API 实现对话式 AI 功能。
66
@@ -54,24 +54,19 @@ export CONVOAI_TTS_MICROSOFT_REGION=<Your tts microsoft region>
5454
export CONVOAI_TTS_MICROSOFT_VOICE_NAME=<Your tts microsoft voice name>
5555
```
5656

57-
### elevenLabs
58-
59-
```bash
60-
export CONVOAI_TTS_ELEVENLABS_API_KEY=<Your tts elevenLabs api key>
61-
export CONVOAI_TTS_ELEVENLABS_MODEL_ID=<Your tts elevenLabs model id>
62-
export CONVOAI_TTS_ELEVENLABS_VOICE_ID=<Your tts elevenLabs voice id>
63-
```
64-
6557
## 执行
6658

6759
使用以下命令运行示例项目:
6860

6961
```bash
70-
go run main.go --ttsVendor=<ttsVendor> --serviceRegion=<serviceRegion>
62+
go run main.go --ttsVendor=<ttsVendor> --serviceRegion=1
7163
```
7264

73-
`ttsVendor` 代表不同的 TTS 提供商。根据您的需求选择合适的 TTS 提供商。
74-
`serviceRegion` 代表选择的服务区域。目前支持的服务区域有:
75-
* `1`:`ChineseMainland`
76-
* `2`:`Global`
65+
`ttsVendor` 代表不同的 TTS 提供商,目前支持的 TTS 提供商有:
66+
67+
- `bytedance`
68+
- `tencent`
69+
- `minimax`
70+
- `microsoft`
7771

72+
根据您的需求选择合适的 TTS 提供商。

services/convoai/README.md

Lines changed: 44 additions & 47 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

@@ -40,23 +39,20 @@ For more api details, please refer to the [API Documentation](https://docs.agora
4039
```go
4140
const (
4241
appId = "<your appId>"
43-
cname = "<your cname>"
4442
username = "<the username of basic auth credential>"
4543
password = "<the password of basic auth credential>"
46-
)
44+
)
4745
// Initialize Conversational AI Config
4846
config := &convoai.Config{
4947
AppID: appId,
5048
Credential: auth.NewBasicAuthCredential(username, password),
5149
// Specify the region where the server is located. Options include CN, EU, AP, US.
5250
// The client will automatically switch to use the best domain based on the configured region.
53-
DomainArea: domain.CN,
51+
DomainArea: domain.US,
5452
// Specify the log output level. Options include DebugLevel, InfoLevel, WarningLevel, ErrLevel.
5553
// To disable log output, set logger to DiscardLogger.
5654
Logger: agoraLogger.NewDefaultLogger(agoraLogger.DebugLevel),
57-
// Specify the service region. Options include ChineseMainlandServiceRegion, GlobalServiceRegion.
58-
// ChineseMainlandServiceRegion and GlobalServiceRegion are two different services.
59-
ServiceRegion: convoai.ChineseMainlandServiceRegion,
55+
ServiceRegion: convoai.GlobalServiceRegion,
6056
}
6157

6258
// Initialize the Conversational AI service client
@@ -67,15 +63,16 @@ For more api details, please refer to the [API Documentation](https://docs.agora
6763
```
6864

6965
### Create Conversational Agent
70-
>
66+
7167
> Create a Conversational AI agent instance and join an RTC channel.
7268
7369
Parameters to set: LLM, TTS, and Agent related parameters.
7470

75-
Call the `Join` method to create a conversational agent, using Bytedance TTS as an example:
71+
Call the `Join` method to create a conversational agent, using Microsoft TTS as an example:
7672

7773
```go
7874
const (
75+
appId = "<your appId>"
7976
cname = "<your cname>"
8077
agentRtcUid = "<your agent rtc uid>"
8178
username = "<the username of basic auth credential>"
@@ -84,15 +81,13 @@ Call the `Join` method to create a conversational agent, using Bytedance TTS as
8481
llmURL = "<your LLM URL>"
8582
llmAPIKey = "<your LLM API Key>"
8683
llmModel = "<your LLM model>"
87-
ttsBytedanceToken = "<your bytedance tts token>"
88-
ttsBytedanceAppId = "<your bytedance tts app id>"
89-
ttsBytedanceCluster = "<your bytedance tts cluster>"
90-
ttsBytedanceVoiceType = "<your bytedance tts voice type>"
84+
ttsMicrosoftKey = "<your microsoft tts key>"
85+
ttsMicrosoftRegion = "<your microsoft tts region>"
86+
ttsMicrosoftVoiceName = "<your microsoft tts voice name>"
9187
)
92-
name := appId + ":" + cname
93-
9488
// Start agent
95-
joinResp, err := convoaiClient.Join(ctx, name, &req.JoinPropertiesReqBody{
89+
name := appId + ":" + cname
90+
joinResp, err := convoaiClient.Join(context.Background(), name, &req.JoinPropertiesReqBody{
9691
Token: agentRtcToken,
9792
Channel: cname,
9893
AgentRtcUId: agentRtcUid,
@@ -116,16 +111,14 @@ Call the `Join` method to create a conversational agent, using Bytedance TTS as
116111
GreetingMessage: "Hello, how can I help you?",
117112
},
118113
TTS: &req.JoinPropertiesTTSBody{
119-
Vendor: req.BytedanceTTSVendor,
120-
Params: &req.TTSBytedanceVendorParams{
121-
Token: ttsBytedanceToken,
122-
AppId: ttsBytedanceAppId,
123-
Cluster: ttsBytedanceCluster,
124-
VoiceType: ttsBytedanceVoiceType,
125-
SpeedRatio: 1.0,
126-
VolumeRatio: 1.0,
127-
PitchRatio: 1.0,
128-
Emotion: "happy",
114+
Vendor: req.MicrosoftTTSVendor,
115+
Params: &req.TTSMicrosoftVendorParams{
116+
Key: ttsMicrosoftKey,
117+
Region: ttsMicrosoftRegion,
118+
VoiceName: ttsMicrosoftVoiceName,
119+
Speed: 1.0,
120+
Volume: 70,
121+
SampleRate: 24000,
129122
},
130123
},
131124
})
@@ -146,7 +139,8 @@ Call the `Join` method to create a conversational agent, using Bytedance TTS as
146139
> Stop the conversational agent and leave the RTC channel.
147140
148141
Parameters to set:
149-
- AgentId returned by the `Join` interface
142+
143+
- AgentId returned by the `Join` interface
150144

151145
```go
152146
// Leave agent
@@ -167,8 +161,9 @@ Parameters to set:
167161
> Currently, only the Token information of a running conversational agent can be updated.
168162
169163
Parameters to set:
170-
- AgentId returned by the `Join` interface
171-
- Token to be updated
164+
165+
- AgentId returned by the `Join` interface
166+
- Token to be updated
172167

173168
```go
174169
// Update agent
@@ -191,7 +186,8 @@ Parameters to set:
191186
> Query the status of the conversational agent.
192187
193188
Parameters to set:
194-
- AgentId returned by the `Join` interface
189+
190+
- AgentId returned by the `Join` interface
195191

196192
```go
197193
// Query agent
@@ -208,13 +204,13 @@ Parameters to set:
208204
}
209205
```
210206

211-
212207
## Retrieves a list of agents
213208

214209
> Retrieves a list of agents that meet the specified criteria.
215210
216211
Parameters to set:
217-
- AgentId returned by the `Join` interface
212+
213+
- AgentId returned by the `Join` interface
218214

219215
```go
220216
// List agent
@@ -234,4 +230,5 @@ Parameters to set:
234230
```
235231

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

services/convoai/README_ZH.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575

7676
```go
7777
const (
78+
appId = "<your appId>"
7879
cname = "<your cname>"
7980
agentRtcUid = "<your agent rtc uid>"
8081
username = "<the username of basic auth credential>"

0 commit comments

Comments
 (0)