agora-agents 2.2.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -26
- package/dist/cjs/AgoraPoolClient.d.ts +9 -6
- package/dist/cjs/AgoraPoolClient.js +1 -0
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.js +8 -16
- package/dist/cjs/agentkit/Agent.d.ts +52 -51
- package/dist/cjs/agentkit/Agent.js +46 -44
- package/dist/cjs/agentkit/AgentSession.d.ts +11 -10
- package/dist/cjs/agentkit/AgentSession.js +12 -6
- package/dist/cjs/agentkit/__tests__/area-aware-vendors.test.d.ts +1 -0
- package/dist/cjs/agentkit/__tests__/area-aware-vendors.test.js +57 -0
- package/dist/cjs/agentkit/__tests__/readme-examples.test.d.ts +1 -0
- package/dist/cjs/agentkit/__tests__/readme-examples.test.js +126 -0
- package/dist/cjs/agentkit/__tests__/type-safety.test.js +24 -17
- package/dist/cjs/agentkit/area.d.ts +4 -0
- package/dist/cjs/agentkit/area.js +2 -0
- package/dist/cjs/agentkit/avatar-types.d.ts +43 -4
- package/dist/cjs/agentkit/avatar-types.js +52 -2
- package/dist/cjs/agentkit/index.d.ts +12 -9
- package/dist/cjs/agentkit/index.js +32 -2
- package/dist/cjs/agentkit/region-vendors.d.ts +15 -0
- package/dist/cjs/agentkit/region-vendors.js +2 -0
- package/dist/cjs/agentkit/token.d.ts +3 -2
- package/dist/cjs/agentkit/token.js +3 -2
- package/dist/cjs/agentkit/types.d.ts +47 -9
- package/dist/cjs/agentkit/vendors/avatar.d.ts +9 -6
- package/dist/cjs/agentkit/vendors/avatar.js +9 -6
- package/dist/cjs/agentkit/vendors/base.d.ts +42 -5
- package/dist/cjs/agentkit/vendors/base.js +64 -6
- package/dist/cjs/agentkit/vendors/cn.d.ts +269 -0
- package/dist/cjs/agentkit/vendors/cn.js +313 -0
- package/dist/cjs/agentkit/vendors/llm.d.ts +1 -1
- package/dist/cjs/agentkit/vendors/llm.js +13 -3
- package/dist/cjs/agentkit/vendors/mllm.d.ts +8 -4
- package/dist/cjs/agentkit/vendors/mllm.js +10 -6
- package/dist/cjs/agentkit/vendors/stt.d.ts +31 -0
- package/dist/cjs/agentkit/vendors/stt.js +31 -1
- package/dist/cjs/agentkit/vendors/tts.d.ts +63 -3
- package/dist/cjs/agentkit/vendors/tts.js +42 -1
- package/dist/cjs/api/resources/agents/client/requests/ListAgentsRequest.d.ts +2 -3
- package/dist/cjs/api/resources/agents/client/requests/StartAgentsRequest.d.ts +23 -3
- package/dist/cjs/api/resources/agents/client/requests/StartAgentsRequest.js +12 -0
- package/dist/cjs/api/resources/agents/types/GetHistoryAgentsResponse.d.ts +6 -0
- package/dist/cjs/api/resources/agents/types/index.d.ts +0 -1
- package/dist/cjs/api/resources/agents/types/index.js +0 -1
- package/dist/cjs/api/types/Asr.d.ts +19 -1
- package/dist/cjs/api/types/BytedanceDuplexTts.d.ts +9 -0
- package/dist/cjs/api/types/BytedanceDuplexTts.js +3 -0
- package/dist/cjs/api/types/BytedanceDuplexTtsParams.d.ts +13 -0
- package/dist/cjs/api/types/BytedanceDuplexTtsParams.js +3 -0
- package/dist/cjs/api/types/BytedanceTts.d.ts +9 -0
- package/dist/cjs/api/types/BytedanceTts.js +3 -0
- package/dist/cjs/api/types/BytedanceTtsParams.d.ts +23 -0
- package/dist/cjs/api/types/BytedanceTtsParams.js +3 -0
- package/dist/cjs/api/types/CosyvoiceTts.d.ts +9 -0
- package/dist/cjs/api/types/CosyvoiceTts.js +3 -0
- package/dist/cjs/api/types/CosyvoiceTtsParams.d.ts +15 -0
- package/dist/cjs/api/types/CosyvoiceTtsParams.js +3 -0
- package/dist/cjs/api/types/FengmingAsr.d.ts +11 -0
- package/dist/cjs/api/types/FengmingAsr.js +3 -0
- package/dist/cjs/api/types/GenericTts.d.ts +13 -0
- package/dist/cjs/api/types/GenericTts.js +3 -0
- package/dist/cjs/api/types/GenericTtsParams.d.ts +21 -0
- package/dist/cjs/api/types/GenericTtsParams.js +3 -0
- package/dist/cjs/api/types/Llm.d.ts +24 -1
- package/dist/cjs/api/types/Llm.js +8 -0
- package/dist/cjs/api/types/MinimaxTtsParams.d.ts +52 -3
- package/dist/cjs/api/types/OpenAiTtsParams.d.ts +1 -1
- package/dist/cjs/api/types/SensetimeAvatarParams.d.ts +48 -0
- package/dist/cjs/api/types/SensetimeAvatarParams.js +3 -0
- package/dist/cjs/api/types/SpatiusAvatarParams.d.ts +23 -0
- package/dist/cjs/api/types/SpatiusAvatarParams.js +3 -0
- package/dist/cjs/api/types/StepfunTts.d.ts +9 -0
- package/dist/cjs/api/types/StepfunTts.js +3 -0
- package/dist/cjs/api/types/StepfunTtsParams.d.ts +13 -0
- package/dist/cjs/api/types/StepfunTtsParams.js +3 -0
- package/dist/cjs/api/types/TencentAsr.d.ts +10 -0
- package/dist/cjs/api/types/TencentAsr.js +3 -0
- package/dist/cjs/api/types/TencentAsrParams.d.ts +17 -0
- package/dist/cjs/api/types/TencentAsrParams.js +3 -0
- package/dist/cjs/api/types/TencentTts.d.ts +9 -0
- package/dist/cjs/api/types/TencentTts.js +3 -0
- package/dist/cjs/api/types/TencentTtsParams.d.ts +23 -0
- package/dist/cjs/api/types/TencentTtsParams.js +3 -0
- package/dist/cjs/api/types/Tts.d.ts +22 -1
- package/dist/cjs/api/types/XAiAsr.d.ts +10 -0
- package/dist/cjs/api/types/XAiAsr.js +3 -0
- package/dist/cjs/api/types/XAiAsrParams.d.ts +15 -0
- package/dist/cjs/api/types/XAiAsrParams.js +3 -0
- package/dist/cjs/api/types/XAiTts.d.ts +9 -0
- package/dist/cjs/api/types/XAiTts.js +3 -0
- package/dist/cjs/api/types/XAiTtsParams.d.ts +15 -0
- package/dist/cjs/api/types/XAiTtsParams.js +3 -0
- package/dist/cjs/api/types/XfyunAsr.d.ts +10 -0
- package/dist/cjs/api/types/XfyunAsr.js +3 -0
- package/dist/cjs/api/types/XfyunAsrParams.d.ts +15 -0
- package/dist/cjs/api/types/XfyunAsrParams.js +3 -0
- package/dist/cjs/api/types/XfyunBigmodelAsr.d.ts +10 -0
- package/dist/cjs/api/types/XfyunBigmodelAsr.js +3 -0
- package/dist/cjs/api/types/XfyunBigmodelAsrParams.d.ts +17 -0
- package/dist/cjs/api/types/XfyunBigmodelAsrParams.js +3 -0
- package/dist/cjs/api/types/XfyunDialectAsr.d.ts +10 -0
- package/dist/cjs/api/types/XfyunDialectAsr.js +3 -0
- package/dist/cjs/api/types/XfyunDialectAsrParams.d.ts +15 -0
- package/dist/cjs/api/types/XfyunDialectAsrParams.js +3 -0
- package/dist/cjs/api/types/index.d.ts +27 -0
- package/dist/cjs/api/types/index.js +27 -0
- package/dist/cjs/core/base64.js +1 -5
- package/dist/cjs/core/domain/index.d.ts +2 -1
- package/dist/cjs/core/domain/index.js +5 -3
- package/dist/cjs/index.d.ts +3 -2
- package/dist/cjs/index.js +31 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/AgoraPoolClient.d.mts +9 -6
- package/dist/esm/AgoraPoolClient.mjs +1 -0
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.mjs +8 -16
- package/dist/esm/agentkit/Agent.d.mts +52 -51
- package/dist/esm/agentkit/Agent.mjs +46 -44
- package/dist/esm/agentkit/AgentSession.d.mts +11 -10
- package/dist/esm/agentkit/AgentSession.mjs +13 -7
- package/dist/esm/agentkit/__tests__/area-aware-vendors.test.d.mts +1 -0
- package/dist/esm/agentkit/__tests__/area-aware-vendors.test.mjs +55 -0
- package/dist/esm/agentkit/__tests__/readme-examples.test.d.mts +1 -0
- package/dist/esm/agentkit/__tests__/readme-examples.test.mjs +124 -0
- package/dist/esm/agentkit/__tests__/type-safety.test.mjs +24 -17
- package/dist/esm/agentkit/area.d.mts +4 -0
- package/dist/esm/agentkit/area.mjs +1 -0
- package/dist/esm/agentkit/avatar-types.d.mts +43 -4
- package/dist/esm/agentkit/avatar-types.mjs +50 -2
- package/dist/esm/agentkit/index.d.mts +12 -9
- package/dist/esm/agentkit/index.mjs +5 -4
- package/dist/esm/agentkit/region-vendors.d.mts +15 -0
- package/dist/esm/agentkit/region-vendors.mjs +1 -0
- package/dist/esm/agentkit/token.d.mts +3 -2
- package/dist/esm/agentkit/token.mjs +3 -2
- package/dist/esm/agentkit/types.d.mts +47 -9
- package/dist/esm/agentkit/vendors/avatar.d.mts +9 -6
- package/dist/esm/agentkit/vendors/avatar.mjs +9 -6
- package/dist/esm/agentkit/vendors/base.d.mts +42 -5
- package/dist/esm/agentkit/vendors/base.mjs +59 -5
- package/dist/esm/agentkit/vendors/cn.d.mts +269 -0
- package/dist/esm/agentkit/vendors/cn.mjs +291 -0
- package/dist/esm/agentkit/vendors/llm.d.mts +1 -1
- package/dist/esm/agentkit/vendors/llm.mjs +13 -3
- package/dist/esm/agentkit/vendors/mllm.d.mts +8 -4
- package/dist/esm/agentkit/vendors/mllm.mjs +10 -6
- package/dist/esm/agentkit/vendors/stt.d.mts +31 -0
- package/dist/esm/agentkit/vendors/stt.mjs +29 -0
- package/dist/esm/agentkit/vendors/tts.d.mts +63 -3
- package/dist/esm/agentkit/vendors/tts.mjs +39 -0
- package/dist/esm/api/resources/agents/client/requests/ListAgentsRequest.d.mts +2 -3
- package/dist/esm/api/resources/agents/client/requests/StartAgentsRequest.d.mts +23 -3
- package/dist/esm/api/resources/agents/client/requests/StartAgentsRequest.mjs +12 -0
- package/dist/esm/api/resources/agents/types/GetHistoryAgentsResponse.d.mts +6 -0
- package/dist/esm/api/resources/agents/types/index.d.mts +0 -1
- package/dist/esm/api/resources/agents/types/index.mjs +0 -1
- package/dist/esm/api/types/Asr.d.mts +19 -1
- package/dist/esm/api/types/BytedanceDuplexTts.d.mts +9 -0
- package/dist/esm/api/types/BytedanceDuplexTts.mjs +2 -0
- package/dist/esm/api/types/BytedanceDuplexTtsParams.d.mts +13 -0
- package/dist/esm/api/types/BytedanceDuplexTtsParams.mjs +2 -0
- package/dist/esm/api/types/BytedanceTts.d.mts +9 -0
- package/dist/esm/api/types/BytedanceTts.mjs +2 -0
- package/dist/esm/api/types/BytedanceTtsParams.d.mts +23 -0
- package/dist/esm/api/types/BytedanceTtsParams.mjs +2 -0
- package/dist/esm/api/types/CosyvoiceTts.d.mts +9 -0
- package/dist/esm/api/types/CosyvoiceTts.mjs +2 -0
- package/dist/esm/api/types/CosyvoiceTtsParams.d.mts +15 -0
- package/dist/esm/api/types/CosyvoiceTtsParams.mjs +2 -0
- package/dist/esm/api/types/FengmingAsr.d.mts +11 -0
- package/dist/esm/api/types/FengmingAsr.mjs +2 -0
- package/dist/esm/api/types/GenericTts.d.mts +13 -0
- package/dist/esm/api/types/GenericTts.mjs +2 -0
- package/dist/esm/api/types/GenericTtsParams.d.mts +21 -0
- package/dist/esm/api/types/GenericTtsParams.mjs +2 -0
- package/dist/esm/api/types/Llm.d.mts +24 -1
- package/dist/esm/api/types/Llm.mjs +8 -0
- package/dist/esm/api/types/MinimaxTtsParams.d.mts +52 -3
- package/dist/esm/api/types/OpenAiTtsParams.d.mts +1 -1
- package/dist/esm/api/types/SensetimeAvatarParams.d.mts +48 -0
- package/dist/esm/api/types/SensetimeAvatarParams.mjs +2 -0
- package/dist/esm/api/types/SpatiusAvatarParams.d.mts +23 -0
- package/dist/esm/api/types/SpatiusAvatarParams.mjs +2 -0
- package/dist/esm/api/types/StepfunTts.d.mts +9 -0
- package/dist/esm/api/types/StepfunTts.mjs +2 -0
- package/dist/esm/api/types/StepfunTtsParams.d.mts +13 -0
- package/dist/esm/api/types/StepfunTtsParams.mjs +2 -0
- package/dist/esm/api/types/TencentAsr.d.mts +10 -0
- package/dist/esm/api/types/TencentAsr.mjs +2 -0
- package/dist/esm/api/types/TencentAsrParams.d.mts +17 -0
- package/dist/esm/api/types/TencentAsrParams.mjs +2 -0
- package/dist/esm/api/types/TencentTts.d.mts +9 -0
- package/dist/esm/api/types/TencentTts.mjs +2 -0
- package/dist/esm/api/types/TencentTtsParams.d.mts +23 -0
- package/dist/esm/api/types/TencentTtsParams.mjs +2 -0
- package/dist/esm/api/types/Tts.d.mts +22 -1
- package/dist/esm/api/types/XAiAsr.d.mts +10 -0
- package/dist/esm/api/types/XAiAsr.mjs +2 -0
- package/dist/esm/api/types/XAiAsrParams.d.mts +15 -0
- package/dist/esm/api/types/XAiAsrParams.mjs +2 -0
- package/dist/esm/api/types/XAiTts.d.mts +9 -0
- package/dist/esm/api/types/XAiTts.mjs +2 -0
- package/dist/esm/api/types/XAiTtsParams.d.mts +15 -0
- package/dist/esm/api/types/XAiTtsParams.mjs +2 -0
- package/dist/esm/api/types/XfyunAsr.d.mts +10 -0
- package/dist/esm/api/types/XfyunAsr.mjs +2 -0
- package/dist/esm/api/types/XfyunAsrParams.d.mts +15 -0
- package/dist/esm/api/types/XfyunAsrParams.mjs +2 -0
- package/dist/esm/api/types/XfyunBigmodelAsr.d.mts +10 -0
- package/dist/esm/api/types/XfyunBigmodelAsr.mjs +2 -0
- package/dist/esm/api/types/XfyunBigmodelAsrParams.d.mts +17 -0
- package/dist/esm/api/types/XfyunBigmodelAsrParams.mjs +2 -0
- package/dist/esm/api/types/XfyunDialectAsr.d.mts +10 -0
- package/dist/esm/api/types/XfyunDialectAsr.mjs +2 -0
- package/dist/esm/api/types/XfyunDialectAsrParams.d.mts +15 -0
- package/dist/esm/api/types/XfyunDialectAsrParams.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +27 -0
- package/dist/esm/api/types/index.mjs +27 -0
- package/dist/esm/core/base64.mjs +1 -5
- package/dist/esm/core/domain/index.d.mts +2 -1
- package/dist/esm/core/domain/index.mjs +4 -2
- package/dist/esm/index.d.mts +3 -2
- package/dist/esm/index.mjs +6 -6
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/dist/cjs/api/resources/agents/types/ListAgentsRequestState.d.ts +0 -10
- package/dist/cjs/api/resources/agents/types/ListAgentsRequestState.js +0 -13
- package/dist/esm/api/resources/agents/types/ListAgentsRequestState.d.mts +0 -10
- package/dist/esm/api/resources/agents/types/ListAgentsRequestState.mjs +0 -10
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CosyVoice TTS configuration parameters.
|
|
3
|
+
*/
|
|
4
|
+
export interface CosyvoiceTtsParams {
|
|
5
|
+
/** CosyVoice API key. */
|
|
6
|
+
api_key: string;
|
|
7
|
+
/** CosyVoice model identifier. */
|
|
8
|
+
model: string;
|
|
9
|
+
/** Audio sample rate in Hz. */
|
|
10
|
+
sample_rate: number;
|
|
11
|
+
/** CosyVoice speaker voice. */
|
|
12
|
+
voice: string;
|
|
13
|
+
/** Accepts any additional properties */
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as Agora from "../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Agora Fengming ASR configuration.
|
|
4
|
+
*/
|
|
5
|
+
export interface FengmingAsr {
|
|
6
|
+
language?: Agora.AsrLanguage;
|
|
7
|
+
/** Agora Fengming ASR configuration parameters. */
|
|
8
|
+
params?: Record<string, unknown>;
|
|
9
|
+
/** Accepts any additional properties */
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as Agora from "../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Generic OpenAI-compatible Text-to-Speech configuration.
|
|
4
|
+
*/
|
|
5
|
+
export interface GenericTts {
|
|
6
|
+
/** Callback address of the generic TTS service. */
|
|
7
|
+
url: string;
|
|
8
|
+
/** Custom headers to include in requests to the generic TTS service. */
|
|
9
|
+
headers: Record<string, string>;
|
|
10
|
+
params: Agora.GenericTtsParams;
|
|
11
|
+
/** Controls whether the TTS module skips bracketed content when reading LLM response text. */
|
|
12
|
+
skip_patterns?: number[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic TTS configuration parameters.
|
|
3
|
+
*/
|
|
4
|
+
export interface GenericTtsParams {
|
|
5
|
+
/** API key for the generic TTS service. */
|
|
6
|
+
api_key?: string;
|
|
7
|
+
/** TTS model name. */
|
|
8
|
+
model: string;
|
|
9
|
+
/** Voice name. */
|
|
10
|
+
voice: string;
|
|
11
|
+
/** Speech rate. */
|
|
12
|
+
speed?: number;
|
|
13
|
+
/** Output audio sample rate in Hz. */
|
|
14
|
+
sample_rate?: number;
|
|
15
|
+
/** Output audio format. ConvoAI currently supports `pcm` only. */
|
|
16
|
+
response_format?: "pcm";
|
|
17
|
+
/** Additional voice style control instruction. */
|
|
18
|
+
instruction?: string;
|
|
19
|
+
/** Accepts any additional properties */
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
}
|
|
@@ -26,6 +26,8 @@ export interface Llm {
|
|
|
26
26
|
output_modalities?: string[];
|
|
27
27
|
/** Agent greeting. */
|
|
28
28
|
greeting_message?: string;
|
|
29
|
+
/** Publicly accessible greeting audio URL. */
|
|
30
|
+
greeting_audio_url?: string;
|
|
29
31
|
/** Prompt for agent activation failure. */
|
|
30
32
|
failure_message?: string;
|
|
31
33
|
/** LLM provider identifier. */
|
|
@@ -35,7 +37,7 @@ export interface Llm {
|
|
|
35
37
|
/** Whether to handle empty Gemini responses. */
|
|
36
38
|
ignore_empty?: boolean | null;
|
|
37
39
|
/** Agent greeting broadcast configuration. */
|
|
38
|
-
greeting_configs?:
|
|
40
|
+
greeting_configs?: Llm.GreetingConfigs;
|
|
39
41
|
/** Template parameter configuration. */
|
|
40
42
|
template_variables?: Record<string, string>;
|
|
41
43
|
/** MCP server configuration. */
|
|
@@ -55,4 +57,25 @@ export declare namespace Llm {
|
|
|
55
57
|
readonly Bedrock: "bedrock";
|
|
56
58
|
};
|
|
57
59
|
type Style = (typeof Style)[keyof typeof Style];
|
|
60
|
+
/**
|
|
61
|
+
* Agent greeting broadcast configuration.
|
|
62
|
+
*/
|
|
63
|
+
interface GreetingConfigs {
|
|
64
|
+
/** Timeout in milliseconds for downloading greeting audio. */
|
|
65
|
+
audio_download_timeout_ms?: number | null;
|
|
66
|
+
/** Sample rate in Hz for PCM greeting audio. */
|
|
67
|
+
audio_pcm_sample_rate?: number | null;
|
|
68
|
+
/** Policy for handling ASR text during uninterruptible greeting playback. */
|
|
69
|
+
uninterruptible_asr_policy?: GreetingConfigs.UninterruptibleAsrPolicy | null;
|
|
70
|
+
/** Accepts any additional properties */
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
}
|
|
73
|
+
namespace GreetingConfigs {
|
|
74
|
+
/** Policy for handling ASR text during uninterruptible greeting playback. */
|
|
75
|
+
const UninterruptibleAsrPolicy: {
|
|
76
|
+
readonly MergeReply: "merge_reply";
|
|
77
|
+
readonly Context: "context";
|
|
78
|
+
};
|
|
79
|
+
type UninterruptibleAsrPolicy = (typeof UninterruptibleAsrPolicy)[keyof typeof UninterruptibleAsrPolicy];
|
|
80
|
+
}
|
|
58
81
|
}
|
|
@@ -9,4 +9,12 @@ export var Llm;
|
|
|
9
9
|
Dify: "dify",
|
|
10
10
|
Bedrock: "bedrock",
|
|
11
11
|
};
|
|
12
|
+
let GreetingConfigs;
|
|
13
|
+
(function (GreetingConfigs) {
|
|
14
|
+
/** Policy for handling ASR text during uninterruptible greeting playback. */
|
|
15
|
+
GreetingConfigs.UninterruptibleAsrPolicy = {
|
|
16
|
+
MergeReply: "merge_reply",
|
|
17
|
+
Context: "context",
|
|
18
|
+
};
|
|
19
|
+
})(GreetingConfigs = Llm.GreetingConfigs || (Llm.GreetingConfigs = {}));
|
|
12
20
|
})(Llm || (Llm = {}));
|
|
@@ -5,12 +5,20 @@ export interface MinimaxTtsParams {
|
|
|
5
5
|
/** MiniMax API key */
|
|
6
6
|
key: string;
|
|
7
7
|
/** MiniMax group identifier */
|
|
8
|
-
group_id
|
|
9
|
-
/** TTS model
|
|
8
|
+
group_id?: string;
|
|
9
|
+
/** BYOK TTS model. Managed MiniMax preset models are selected through the top-level preset field instead. */
|
|
10
10
|
model: string;
|
|
11
11
|
voice_setting: MinimaxTtsParams.VoiceSetting;
|
|
12
|
+
/** Audio output settings. */
|
|
13
|
+
audio_setting?: MinimaxTtsParams.AudioSetting;
|
|
14
|
+
/** Custom pronunciation dictionary settings. */
|
|
15
|
+
pronunciation_dict?: MinimaxTtsParams.PronunciationDict;
|
|
16
|
+
/** Weighted voice blending configuration. */
|
|
17
|
+
timber_weights?: MinimaxTtsParams.TimberWeights.Item[];
|
|
18
|
+
/** Language boost mode. */
|
|
19
|
+
language_boost?: string;
|
|
12
20
|
/** WebSocket endpoint (e.g., wss://api-uw.minimax.io/ws/v1/t2a_v2) */
|
|
13
|
-
url
|
|
21
|
+
url?: string;
|
|
14
22
|
/** Accepts any additional properties */
|
|
15
23
|
[key: string]: any;
|
|
16
24
|
}
|
|
@@ -18,7 +26,48 @@ export declare namespace MinimaxTtsParams {
|
|
|
18
26
|
interface VoiceSetting {
|
|
19
27
|
/** Voice style identifier (e.g., English_captivating_female1) */
|
|
20
28
|
voice_id: string;
|
|
29
|
+
/** Speech speed multiplier. */
|
|
30
|
+
speed?: number;
|
|
31
|
+
/** Voice volume multiplier. */
|
|
32
|
+
vol?: number;
|
|
33
|
+
/** Voice pitch adjustment. */
|
|
34
|
+
pitch?: number;
|
|
35
|
+
/** Emotion preset. */
|
|
36
|
+
emotion?: string;
|
|
37
|
+
/** Whether to read LaTeX expressions. */
|
|
38
|
+
latex_read?: boolean;
|
|
39
|
+
/** Whether to normalize English text before synthesis. */
|
|
40
|
+
english_normalization?: boolean;
|
|
21
41
|
/** Accepts any additional properties */
|
|
22
42
|
[key: string]: any;
|
|
23
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Audio output settings.
|
|
46
|
+
*/
|
|
47
|
+
interface AudioSetting {
|
|
48
|
+
/** Audio sample rate in Hz. */
|
|
49
|
+
sample_rate?: number;
|
|
50
|
+
/** Accepts any additional properties */
|
|
51
|
+
[key: string]: any;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Custom pronunciation dictionary settings.
|
|
55
|
+
*/
|
|
56
|
+
interface PronunciationDict {
|
|
57
|
+
/** Tone override list. */
|
|
58
|
+
tone?: string[];
|
|
59
|
+
/** Accepts any additional properties */
|
|
60
|
+
[key: string]: any;
|
|
61
|
+
}
|
|
62
|
+
type TimberWeights = TimberWeights.Item[];
|
|
63
|
+
namespace TimberWeights {
|
|
64
|
+
interface Item {
|
|
65
|
+
/** Voice identifier for blending. */
|
|
66
|
+
voice_id?: string;
|
|
67
|
+
/** Relative blend weight. */
|
|
68
|
+
weight?: number;
|
|
69
|
+
/** Accepts any additional properties */
|
|
70
|
+
[key: string]: any;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
24
73
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* OpenAI TTS configuration parameters.
|
|
3
3
|
*/
|
|
4
4
|
export interface OpenAiTtsParams {
|
|
5
|
-
/** OpenAI API key. Optional for
|
|
5
|
+
/** OpenAI API key. Optional for preset-backed OpenAI TTS usage. */
|
|
6
6
|
api_key?: string;
|
|
7
7
|
/** Endpoint URL for the OpenAI TTS service. */
|
|
8
8
|
base_url?: string;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SenseTime Avatar configuration parameters.
|
|
3
|
+
*/
|
|
4
|
+
export interface SensetimeAvatarParams {
|
|
5
|
+
/** Agora token used by the avatar service. */
|
|
6
|
+
agora_token: string;
|
|
7
|
+
/** Numeric Agora UID string used by the avatar service. */
|
|
8
|
+
agora_uid: string;
|
|
9
|
+
/** SenseTime application ID. */
|
|
10
|
+
appId: string;
|
|
11
|
+
/** SenseTime application key. */
|
|
12
|
+
app_key: string;
|
|
13
|
+
/** SenseTime scene configuration list. */
|
|
14
|
+
sceneList: SensetimeAvatarParams.SceneList.Item[];
|
|
15
|
+
/** Accepts any additional properties */
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
18
|
+
export declare namespace SensetimeAvatarParams {
|
|
19
|
+
type SceneList = SceneList.Item[];
|
|
20
|
+
namespace SceneList {
|
|
21
|
+
interface Item {
|
|
22
|
+
digital_role?: Item.DigitalRole;
|
|
23
|
+
/** Accepts any additional properties */
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}
|
|
26
|
+
namespace Item {
|
|
27
|
+
interface DigitalRole {
|
|
28
|
+
/** SenseTime face feature identifier. */
|
|
29
|
+
face_feature_id?: string;
|
|
30
|
+
position?: DigitalRole.Position;
|
|
31
|
+
/** Avatar model package URL. */
|
|
32
|
+
url?: string;
|
|
33
|
+
/** Accepts any additional properties */
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}
|
|
36
|
+
namespace DigitalRole {
|
|
37
|
+
interface Position {
|
|
38
|
+
/** Avatar x position. */
|
|
39
|
+
x?: number;
|
|
40
|
+
/** Avatar y position. */
|
|
41
|
+
y?: number;
|
|
42
|
+
/** Accepts any additional properties */
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spatius Avatar configuration parameters.
|
|
3
|
+
*/
|
|
4
|
+
export interface SpatiusAvatarParams {
|
|
5
|
+
/** Spatius API key. */
|
|
6
|
+
spatius_api_key: string;
|
|
7
|
+
/** Spatius application ID. */
|
|
8
|
+
spatius_app_id: string;
|
|
9
|
+
/** Spatius avatar ID. */
|
|
10
|
+
spatius_avatar_id: string;
|
|
11
|
+
/** Agora UID used by the avatar service. */
|
|
12
|
+
agora_uid: string;
|
|
13
|
+
/** RTC token generated for `agora_uid` in the target channel. */
|
|
14
|
+
agora_token?: string | null;
|
|
15
|
+
/** Spatius service region, for example `cn-beijing`. */
|
|
16
|
+
region?: string | null;
|
|
17
|
+
/** Audio sample rate in Hz. Recommended to match the TTS sample rate. */
|
|
18
|
+
sample_rate?: number | null;
|
|
19
|
+
/** Spatius session validity duration in minutes. Defaults to 30. */
|
|
20
|
+
session_expire_minutes?: number | null;
|
|
21
|
+
/** Accepts any additional properties */
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as Agora from "../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* StepFun Text-to-Speech configuration.
|
|
4
|
+
*/
|
|
5
|
+
export interface StepfunTts {
|
|
6
|
+
params: Agora.StepfunTtsParams;
|
|
7
|
+
/** Controls whether the TTS module skips bracketed content when reading LLM response text. */
|
|
8
|
+
skip_patterns?: number[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StepFun TTS configuration parameters.
|
|
3
|
+
*/
|
|
4
|
+
export interface StepfunTtsParams {
|
|
5
|
+
/** StepFun API key. */
|
|
6
|
+
api_key: string;
|
|
7
|
+
/** StepFun model identifier. */
|
|
8
|
+
model: string;
|
|
9
|
+
/** StepFun voice identifier. */
|
|
10
|
+
voice_id: string;
|
|
11
|
+
/** Accepts any additional properties */
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tencent ASR configuration parameters.
|
|
3
|
+
*/
|
|
4
|
+
export interface TencentAsrParams {
|
|
5
|
+
/** Tencent ASR secret key. */
|
|
6
|
+
key: string;
|
|
7
|
+
/** Tencent Cloud application ID. */
|
|
8
|
+
app_id: string;
|
|
9
|
+
/** Tencent ASR secret. */
|
|
10
|
+
secret: string;
|
|
11
|
+
/** Tencent ASR engine model type. */
|
|
12
|
+
engine_model_type: string;
|
|
13
|
+
/** Tencent ASR voice session identifier. */
|
|
14
|
+
voice_id: string;
|
|
15
|
+
/** Accepts any additional properties */
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as Agora from "../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Tencent Text-to-Speech configuration.
|
|
4
|
+
*/
|
|
5
|
+
export interface TencentTts {
|
|
6
|
+
params: Agora.TencentTtsParams;
|
|
7
|
+
/** Controls whether the TTS module skips bracketed content when reading LLM response text. */
|
|
8
|
+
skip_patterns?: number[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tencent TTS configuration parameters.
|
|
3
|
+
*/
|
|
4
|
+
export interface TencentTtsParams {
|
|
5
|
+
/** Tencent Cloud application ID. */
|
|
6
|
+
app_id: string;
|
|
7
|
+
/** Tencent Cloud secret ID. */
|
|
8
|
+
secret_id: string;
|
|
9
|
+
/** Tencent Cloud secret key. */
|
|
10
|
+
secret_key: string;
|
|
11
|
+
/** Tencent voice type identifier. */
|
|
12
|
+
voice_type: number;
|
|
13
|
+
/** Volume setting. */
|
|
14
|
+
volume?: number;
|
|
15
|
+
/** Speech speed setting. */
|
|
16
|
+
speed?: number;
|
|
17
|
+
/** Emotion category. */
|
|
18
|
+
emotion_category?: string;
|
|
19
|
+
/** Emotion intensity. */
|
|
20
|
+
emotion_intensity?: number;
|
|
21
|
+
/** Accepts any additional properties */
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type * as Agora from "../index.mjs";
|
|
2
|
-
export type Tts = Agora.Tts.Microsoft | Agora.Tts.Elevenlabs | Agora.Tts.Minimax | Agora.Tts.Murf | Agora.Tts.Cartesia | Agora.Tts.Openai | Agora.Tts.Humeai | Agora.Tts.Rime | Agora.Tts.Fishaudio | Agora.Tts.Google | Agora.Tts.Amazon | Agora.Tts.Sarvam | Agora.Tts.Deepgram;
|
|
2
|
+
export type Tts = Agora.Tts.Tencent | Agora.Tts.Bytedance | Agora.Tts.Microsoft | Agora.Tts.Elevenlabs | Agora.Tts.Minimax | Agora.Tts.Murf | Agora.Tts.Cartesia | Agora.Tts.Openai | Agora.Tts.Humeai | Agora.Tts.Rime | Agora.Tts.Fishaudio | Agora.Tts.Google | Agora.Tts.Amazon | Agora.Tts.Sarvam | Agora.Tts.Generic | Agora.Tts.Xai | Agora.Tts.Deepgram | Agora.Tts.Cosyvoice | Agora.Tts.BytedanceDuplex | Agora.Tts.Stepfun;
|
|
3
3
|
export declare namespace Tts {
|
|
4
|
+
interface Tencent extends Agora.TencentTts {
|
|
5
|
+
vendor: "tencent";
|
|
6
|
+
}
|
|
7
|
+
interface Bytedance extends Agora.BytedanceTts {
|
|
8
|
+
vendor: "bytedance";
|
|
9
|
+
}
|
|
4
10
|
interface Microsoft extends Agora.MicrosoftTts {
|
|
5
11
|
vendor: "microsoft";
|
|
6
12
|
}
|
|
@@ -37,7 +43,22 @@ export declare namespace Tts {
|
|
|
37
43
|
interface Sarvam extends Agora.SarvamTts {
|
|
38
44
|
vendor: "sarvam";
|
|
39
45
|
}
|
|
46
|
+
interface Generic extends Agora.GenericTts {
|
|
47
|
+
vendor: "generic";
|
|
48
|
+
}
|
|
49
|
+
interface Xai extends Agora.XAiTts {
|
|
50
|
+
vendor: "xai";
|
|
51
|
+
}
|
|
40
52
|
interface Deepgram extends Agora.DeepgramTts {
|
|
41
53
|
vendor: "deepgram";
|
|
42
54
|
}
|
|
55
|
+
interface Cosyvoice extends Agora.CosyvoiceTts {
|
|
56
|
+
vendor: "cosyvoice";
|
|
57
|
+
}
|
|
58
|
+
interface BytedanceDuplex extends Agora.BytedanceDuplexTts {
|
|
59
|
+
vendor: "bytedance_duplex";
|
|
60
|
+
}
|
|
61
|
+
interface Stepfun extends Agora.StepfunTts {
|
|
62
|
+
vendor: "stepfun";
|
|
63
|
+
}
|
|
43
64
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* xAI ASR configuration parameters.
|
|
3
|
+
*/
|
|
4
|
+
export interface XAiAsrParams {
|
|
5
|
+
/** xAI API key */
|
|
6
|
+
api_key: string;
|
|
7
|
+
/** WebSocket endpoint URL for the xAI streaming STT API. Defaults to `wss://api.x.ai/v1/stt`. */
|
|
8
|
+
base_url?: string | null;
|
|
9
|
+
/** Audio sample rate in Hz. */
|
|
10
|
+
sample_rate?: number | null;
|
|
11
|
+
/** Language code for speech recognition. */
|
|
12
|
+
language?: string | null;
|
|
13
|
+
/** Accepts any additional properties */
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as Agora from "../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* xAI Text-to-Speech configuration.
|
|
4
|
+
*/
|
|
5
|
+
export interface XAiTts {
|
|
6
|
+
params: Agora.XAiTtsParams;
|
|
7
|
+
/** Controls whether the TTS module skips bracketed content when reading LLM response text. */
|
|
8
|
+
skip_patterns?: number[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* xAI TTS configuration parameters.
|
|
3
|
+
*/
|
|
4
|
+
export interface XAiTtsParams {
|
|
5
|
+
/** xAI API key. */
|
|
6
|
+
api_key: string;
|
|
7
|
+
/** xAI voice identifier. */
|
|
8
|
+
voice_id?: string | null;
|
|
9
|
+
/** BCP-47 language code for speech synthesis. */
|
|
10
|
+
language: string;
|
|
11
|
+
/** Audio sample rate in Hz. */
|
|
12
|
+
sample_rate?: number | null;
|
|
13
|
+
/** Accepts any additional properties */
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* iFlytek ASR configuration parameters.
|
|
3
|
+
*/
|
|
4
|
+
export interface XfyunAsrParams {
|
|
5
|
+
/** iFlytek API key. */
|
|
6
|
+
api_key: string;
|
|
7
|
+
/** iFlytek application ID. */
|
|
8
|
+
app_id: string;
|
|
9
|
+
/** iFlytek API secret. */
|
|
10
|
+
api_secret: string;
|
|
11
|
+
/** iFlytek language code. */
|
|
12
|
+
language: string;
|
|
13
|
+
/** Accepts any additional properties */
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as Agora from "../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* iFlytek large-model ASR configuration.
|
|
4
|
+
*/
|
|
5
|
+
export interface XfyunBigmodelAsr {
|
|
6
|
+
language?: Agora.AsrLanguage;
|
|
7
|
+
params: Agora.XfyunBigmodelAsrParams;
|
|
8
|
+
/** Accepts any additional properties */
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* iFlytek large-model ASR configuration parameters.
|
|
3
|
+
*/
|
|
4
|
+
export interface XfyunBigmodelAsrParams {
|
|
5
|
+
/** iFlytek large-model API key. */
|
|
6
|
+
api_key: string;
|
|
7
|
+
/** iFlytek large-model application ID. */
|
|
8
|
+
app_id: string;
|
|
9
|
+
/** iFlytek large-model API secret. */
|
|
10
|
+
api_secret: string;
|
|
11
|
+
/** iFlytek language family name. */
|
|
12
|
+
language_name: string;
|
|
13
|
+
/** iFlytek language mode. */
|
|
14
|
+
language: string;
|
|
15
|
+
/** Accepts any additional properties */
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as Agora from "../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* iFlytek dialect ASR configuration.
|
|
4
|
+
*/
|
|
5
|
+
export interface XfyunDialectAsr {
|
|
6
|
+
language?: Agora.AsrLanguage;
|
|
7
|
+
params: Agora.XfyunDialectAsrParams;
|
|
8
|
+
/** Accepts any additional properties */
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* iFlytek dialect ASR configuration parameters.
|
|
3
|
+
*/
|
|
4
|
+
export interface XfyunDialectAsrParams {
|
|
5
|
+
/** iFlytek dialect application ID. */
|
|
6
|
+
app_id: string;
|
|
7
|
+
/** iFlytek access key ID. */
|
|
8
|
+
access_key_id: string;
|
|
9
|
+
/** iFlytek access key secret. */
|
|
10
|
+
access_key_secret: string;
|
|
11
|
+
/** Dialect recognition language code. */
|
|
12
|
+
language: string;
|
|
13
|
+
/** Accepts any additional properties */
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|