agora-agents 2.4.0 → 2.5.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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/agentkit/__tests__/area-aware-vendors.test.js +4 -0
- package/dist/cjs/agentkit/constants.d.ts +6 -0
- package/dist/cjs/agentkit/constants.js +6 -1
- package/dist/cjs/agentkit/index.d.ts +4 -4
- package/dist/cjs/agentkit/index.js +6 -3
- package/dist/cjs/agentkit/region-vendors.d.ts +2 -1
- package/dist/cjs/agentkit/types.d.ts +5 -1
- package/dist/cjs/agentkit/vendors/mllm.d.ts +1 -1
- package/dist/cjs/agentkit/vendors/mllm.js +1 -1
- package/dist/cjs/agentkit/vendors/tts.d.ts +81 -9
- package/dist/cjs/agentkit/vendors/tts.js +70 -12
- package/dist/cjs/api/types/{GenericTts.d.ts → GenericHttpTts.d.ts} +3 -3
- package/dist/cjs/api/types/{GenericTtsParams.d.ts → GenericHttpTtsParams.d.ts} +3 -3
- package/dist/cjs/api/types/GradiumTts.d.ts +9 -0
- package/dist/cjs/api/types/GradiumTts.js +3 -0
- package/dist/cjs/api/types/GradiumTtsParams.d.ts +17 -0
- package/dist/cjs/api/types/GradiumTtsParams.js +3 -0
- package/dist/cjs/api/types/MistralTts.d.ts +9 -0
- package/dist/cjs/api/types/MistralTts.js +3 -0
- package/dist/cjs/api/types/MistralTtsParams.d.ts +13 -0
- package/dist/cjs/api/types/MistralTtsParams.js +3 -0
- package/dist/cjs/api/types/RimeTts.d.ts +10 -0
- package/dist/cjs/api/types/RimeTts.js +9 -0
- package/dist/cjs/api/types/RimeTtsParams.d.ts +2 -2
- package/dist/cjs/api/types/Tts.d.ts +9 -3
- package/dist/cjs/api/types/index.d.ts +6 -2
- package/dist/cjs/api/types/index.js +6 -2
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +6 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/agentkit/__tests__/area-aware-vendors.test.mjs +5 -1
- package/dist/esm/agentkit/constants.d.mts +6 -0
- package/dist/esm/agentkit/constants.mjs +5 -0
- package/dist/esm/agentkit/index.d.mts +4 -4
- package/dist/esm/agentkit/index.mjs +2 -2
- package/dist/esm/agentkit/region-vendors.d.mts +2 -1
- package/dist/esm/agentkit/types.d.mts +5 -1
- package/dist/esm/agentkit/vendors/mllm.d.mts +1 -1
- package/dist/esm/agentkit/vendors/mllm.mjs +1 -1
- package/dist/esm/agentkit/vendors/tts.d.mts +81 -9
- package/dist/esm/agentkit/vendors/tts.mjs +67 -11
- package/dist/esm/api/types/{GenericTts.d.mts → GenericHttpTts.d.mts} +3 -3
- package/dist/esm/api/types/{GenericTtsParams.d.mts → GenericHttpTtsParams.d.mts} +3 -3
- package/dist/esm/api/types/GradiumTts.d.mts +9 -0
- package/dist/esm/api/types/GradiumTts.mjs +2 -0
- package/dist/esm/api/types/GradiumTtsParams.d.mts +17 -0
- package/dist/esm/api/types/GradiumTtsParams.mjs +2 -0
- package/dist/esm/api/types/MistralTts.d.mts +9 -0
- package/dist/esm/api/types/MistralTts.mjs +2 -0
- package/dist/esm/api/types/MistralTtsParams.d.mts +13 -0
- package/dist/esm/api/types/MistralTtsParams.mjs +2 -0
- package/dist/esm/api/types/RimeTts.d.mts +10 -0
- package/dist/esm/api/types/RimeTts.mjs +8 -1
- package/dist/esm/api/types/RimeTtsParams.d.mts +2 -2
- package/dist/esm/api/types/Tts.d.mts +9 -3
- package/dist/esm/api/types/index.d.mts +6 -2
- package/dist/esm/api/types/index.mjs +6 -2
- package/dist/esm/index.d.mts +2 -2
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- /package/dist/cjs/api/types/{GenericTts.js → GenericHttpTts.js} +0 -0
- /package/dist/cjs/api/types/{GenericTtsParams.js → GenericHttpTtsParams.js} +0 -0
- /package/dist/esm/api/types/{GenericTts.mjs → GenericHttpTts.mjs} +0 -0
- /package/dist/esm/api/types/{GenericTtsParams.mjs → GenericHttpTtsParams.mjs} +0 -0
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface RimeTtsParams {
|
|
5
5
|
/** Rime API key */
|
|
6
|
-
api_key
|
|
6
|
+
api_key?: string;
|
|
7
7
|
/** Rime speaker ID */
|
|
8
|
-
speaker
|
|
8
|
+
speaker?: string;
|
|
9
9
|
/** Rime TTS model ID */
|
|
10
10
|
modelId: string;
|
|
11
11
|
/** WebSocket URL for the Rime streaming API */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as Agora from "../index.js";
|
|
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.
|
|
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.GenericHttp | Agora.Tts.Xai | Agora.Tts.Deepgram | Agora.Tts.Cosyvoice | Agora.Tts.BytedanceDuplex | Agora.Tts.Stepfun | Agora.Tts.Gradium | Agora.Tts.Mistral;
|
|
3
3
|
export declare namespace Tts {
|
|
4
4
|
interface Tencent extends Agora.TencentTts {
|
|
5
5
|
vendor: "tencent";
|
|
@@ -43,8 +43,8 @@ export declare namespace Tts {
|
|
|
43
43
|
interface Sarvam extends Agora.SarvamTts {
|
|
44
44
|
vendor: "sarvam";
|
|
45
45
|
}
|
|
46
|
-
interface
|
|
47
|
-
vendor: "
|
|
46
|
+
interface GenericHttp extends Agora.GenericHttpTts {
|
|
47
|
+
vendor: "generic_http";
|
|
48
48
|
}
|
|
49
49
|
interface Xai extends Agora.XAiTts {
|
|
50
50
|
vendor: "xai";
|
|
@@ -61,4 +61,10 @@ export declare namespace Tts {
|
|
|
61
61
|
interface Stepfun extends Agora.StepfunTts {
|
|
62
62
|
vendor: "stepfun";
|
|
63
63
|
}
|
|
64
|
+
interface Gradium extends Agora.GradiumTts {
|
|
65
|
+
vendor: "gradium";
|
|
66
|
+
}
|
|
67
|
+
interface Mistral extends Agora.MistralTts {
|
|
68
|
+
vendor: "mistral";
|
|
69
|
+
}
|
|
64
70
|
}
|
|
@@ -28,14 +28,16 @@ export * from "./ElevenLabsTtsParams.js";
|
|
|
28
28
|
export * from "./FengmingAsr.js";
|
|
29
29
|
export * from "./FishAudioTts.js";
|
|
30
30
|
export * from "./FishAudioTtsParams.js";
|
|
31
|
-
export * from "./
|
|
32
|
-
export * from "./
|
|
31
|
+
export * from "./GenericHttpTts.js";
|
|
32
|
+
export * from "./GenericHttpTtsParams.js";
|
|
33
33
|
export * from "./GoogleAsr.js";
|
|
34
34
|
export * from "./GoogleAsrParams.js";
|
|
35
35
|
export * from "./GoogleTts.js";
|
|
36
36
|
export * from "./GoogleTtsAudioConfig.js";
|
|
37
37
|
export * from "./GoogleTtsParams.js";
|
|
38
38
|
export * from "./GoogleTtsVoiceSelectionParams.js";
|
|
39
|
+
export * from "./GradiumTts.js";
|
|
40
|
+
export * from "./GradiumTtsParams.js";
|
|
39
41
|
export * from "./HumeAiTts.js";
|
|
40
42
|
export * from "./HumeAiTtsParams.js";
|
|
41
43
|
export * from "./Llm.js";
|
|
@@ -46,6 +48,8 @@ export * from "./MicrosoftTts.js";
|
|
|
46
48
|
export * from "./MicrosoftTtsParams.js";
|
|
47
49
|
export * from "./MinimaxTts.js";
|
|
48
50
|
export * from "./MinimaxTtsParams.js";
|
|
51
|
+
export * from "./MistralTts.js";
|
|
52
|
+
export * from "./MistralTtsParams.js";
|
|
49
53
|
export * from "./Mllm.js";
|
|
50
54
|
export * from "./MllmHttpOptions.js";
|
|
51
55
|
export * from "./MllmInputAudioTranscription.js";
|
|
@@ -44,14 +44,16 @@ __exportStar(require("./ElevenLabsTtsParams.js"), exports);
|
|
|
44
44
|
__exportStar(require("./FengmingAsr.js"), exports);
|
|
45
45
|
__exportStar(require("./FishAudioTts.js"), exports);
|
|
46
46
|
__exportStar(require("./FishAudioTtsParams.js"), exports);
|
|
47
|
-
__exportStar(require("./
|
|
48
|
-
__exportStar(require("./
|
|
47
|
+
__exportStar(require("./GenericHttpTts.js"), exports);
|
|
48
|
+
__exportStar(require("./GenericHttpTtsParams.js"), exports);
|
|
49
49
|
__exportStar(require("./GoogleAsr.js"), exports);
|
|
50
50
|
__exportStar(require("./GoogleAsrParams.js"), exports);
|
|
51
51
|
__exportStar(require("./GoogleTts.js"), exports);
|
|
52
52
|
__exportStar(require("./GoogleTtsAudioConfig.js"), exports);
|
|
53
53
|
__exportStar(require("./GoogleTtsParams.js"), exports);
|
|
54
54
|
__exportStar(require("./GoogleTtsVoiceSelectionParams.js"), exports);
|
|
55
|
+
__exportStar(require("./GradiumTts.js"), exports);
|
|
56
|
+
__exportStar(require("./GradiumTtsParams.js"), exports);
|
|
55
57
|
__exportStar(require("./HumeAiTts.js"), exports);
|
|
56
58
|
__exportStar(require("./HumeAiTtsParams.js"), exports);
|
|
57
59
|
__exportStar(require("./Llm.js"), exports);
|
|
@@ -62,6 +64,8 @@ __exportStar(require("./MicrosoftTts.js"), exports);
|
|
|
62
64
|
__exportStar(require("./MicrosoftTtsParams.js"), exports);
|
|
63
65
|
__exportStar(require("./MinimaxTts.js"), exports);
|
|
64
66
|
__exportStar(require("./MinimaxTtsParams.js"), exports);
|
|
67
|
+
__exportStar(require("./MistralTts.js"), exports);
|
|
68
|
+
__exportStar(require("./MistralTtsParams.js"), exports);
|
|
65
69
|
__exportStar(require("./Mllm.js"), exports);
|
|
66
70
|
__exportStar(require("./MllmHttpOptions.js"), exports);
|
|
67
71
|
__exportStar(require("./MllmInputAudioTranscription.js"), exports);
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export type { AgoraAuthMode } from "./AgoraPoolClient.js";
|
|
2
2
|
export { AgoraClient } from "./AgoraPoolClient.js";
|
|
3
3
|
export type { AgoraArea, AreaScope, GlobalArea } from "./agentkit/area.js";
|
|
4
|
-
export type { AdvancedFeatures, AgentConfig, AgentConfigUpdate, AgentOptions, AgentPreset, AgentSessionEvent, AgentSessionEventHandler, AgentSessionOptions, AgentsClient, AkoolAvatarConfig, AkoolAvatarOptions, AkoolSampleRate, AliyunLLMOptions, AmazonBedrockOptions, AmazonSTTOptions, AmazonTTSOptions, AmazonTts, AmazonTtsParams, AnamAvatarConfig, AnamAvatarOptions, AnthropicOptions, AresSTTOptions, AsrConfig, AsrPreset, AsrVendorName, AssemblyAISTTOptions, AvatarConfig, AvatarVendor, AvatarWireVendor, AzureOpenAIOptions, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CartesiaSampleRate, CartesiaTTSOptions, CartesiaTts, CartesiaTtsParams, CNAvatarVendor, CNLlmVendor, CNSttVendor, CNTtsVendor, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, CustomLLMOptions, DeepgramSTTOptions, DeepgramTTSOptions, DeepSeekLLMOptions, DifyOptions, Eagerness, ElevenLabsSampleRate, ElevenLabsTTSOptions, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FillerWordsConfig, FillerWordsContent, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTTSOptions, FishAudioTts, FishAudioTtsParams, GeminiLiveOptions, GeminiOptions, GenerateConvoAITokenOptions, GenerateTokenOptions, GenericAvatarConfig, GenericAvatarOptions, GenericTTSOptions, GenericTts, GenericTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GlobalAvatarVendor, GlobalLlmVendor, GlobalSttVendor, GlobalTtsVendor, GoogleSTTOptions, GoogleTTSOptions, GoogleTts, GoogleTtsParams, GroqOptions, HeyGenAvatarConfig, HeyGenAvatarOptions, HeyGenSampleRate, HumeAITTSOptions, HumeAiTts, HumeAiTtsParams, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LiveAvatarAvatarConfig, LiveAvatarAvatarOptions, LiveAvatarSampleRate, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmPreset, LlmStyle, LlmVendor, McpServersItem, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MicrosoftSampleRate, MicrosoftSTTOptions, MicrosoftTTSOptions, MicrosoftTts, MicrosoftTtsParams, MiniMaxCNTTSOptions, MiniMaxTTSOptions, MinimaxTts, MinimaxTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTTSOptions, MurfTts, MurfTtsParams, OpenAIOptions, OpenAIRealtimeOptions, OpenAISTTOptions, OpenAITTSOptions, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, PresetCategory, PresetInput, RimeTTSOptions, RimeTts, RimeTtsParams, RtcConfig, SalConfig, SalMode, SampleRate, SarvamSTTOptions, SarvamTTSOptions, SarvamTts, SarvamTtsParams, SayOptions, SensetimeAvatarConfig, SensetimeAvatarOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SpatiusAvatarConfig, SpatiusAvatarOptions, SpatiusAvatarParams, SpeakPriority, SpeechmaticsSTTOptions, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, StepFunTTSOptions, StrictAvatarConfig, SttConfig, SttVendor, TencentLLMOptions, TencentSTTOptions, TencentTTSOptions, ThinkOnListeningAction, ThinkOnSpeakingAction, ThinkOnThinkingAction, ThinkOptions, ThinkResponse, TtsConfig, TtsPreset, TtsVendor, TurnDetectionConfig, TurnDetectionLanguage, TurnDetectionNestedConfig, TurnDetectionType, VertexAILLMOptions, VertexAIOptions, XAiAsr, XAiAsrParams, XAiSTTOptions, XAiTTSOptions, XAiTts, XAiTtsParams, XaiGrokOptions, XfyunBigModelSTTOptions, XfyunDialectSTTOptions, XfyunSTTOptions, } from "./agentkit/index.js";
|
|
5
|
-
export { Agent, AgentPresets, AgentSession, AkoolAvatar, AliyunLLM, AmazonBedrock, AmazonSTT, AmazonTTS, AnamAvatar, Anthropic, AresSTT, AssemblyAISTT, AudioScenario, AzureOpenAI, BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNSTT, BaseCNTTS, BaseLLM, BaseMLLM, BaseSTT, BaseTTS, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CartesiaTTS, CosyVoiceTTS, CustomLLM, DataChannel, DeepgramSTT, DeepgramTTS, DeepSeekLLM, Dify, ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioTTS, Gemini, GeminiLive, GenericAvatar, GenericTTS, Geofence, GoogleSTT, GoogleTTS, Groq, generateConvoAIToken, generateRtcToken, HeyGenAvatar, HumeAITTS, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, isSensetimeAvatar, isSpatiusAvatar, LiveAvatarAvatar, MAX_EXPIRY_SECONDS, MicrosoftCNSTT, MicrosoftCNTTS, MicrosoftSTT, MicrosoftTTS, MiniMaxCNTTS, MiniMaxTTS, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, MurfTTS, normalizePresetInput, OpenAI, OpenAIRealtime, OpenAISTT, OpenAITTS, RimeTTS, SalModeValues, SarvamSTT, SarvamTTS, SensetimeAvatar, SilenceActionValues, SpatiusAvatar, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, SpeechmaticsSTT, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, ThinkOnListeningActionIgnore, ThinkOnListeningActionInject, ThinkOnListeningActionInterrupt, ThinkOnSpeakingActionIgnore, ThinkOnSpeakingActionInterrupt, ThinkOnThinkingActionIgnore, ThinkOnThinkingActionInterrupt, TurnDetectionTypeValues, toBaseAvatarConfig, VertexAI, VertexAILLM, validateAvatarConfig, validateTtsSampleRate, XAiSTT, XAiTTS, XaiGrok, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./agentkit/index.js";
|
|
4
|
+
export type { AdvancedFeatures, AgentConfig, AgentConfigUpdate, AgentOptions, AgentPreset, AgentSessionEvent, AgentSessionEventHandler, AgentSessionOptions, AgentsClient, AkoolAvatarConfig, AkoolAvatarOptions, AkoolSampleRate, AliyunLLMOptions, AmazonBedrockOptions, AmazonSTTOptions, AmazonTTSOptions, AmazonTts, AmazonTtsParams, AnamAvatarConfig, AnamAvatarOptions, AnthropicOptions, AresSTTOptions, AsrConfig, AsrPreset, AsrVendorName, AssemblyAISTTOptions, AvatarConfig, AvatarVendor, AvatarWireVendor, AzureOpenAIOptions, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CartesiaSampleRate, CartesiaTTSOptions, CartesiaTts, CartesiaTtsParams, CNAvatarVendor, CNLlmVendor, CNSttVendor, CNTtsVendor, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, CustomLLMOptions, DeepgramSTTOptions, DeepgramTTSOptions, DeepSeekLLMOptions, DifyOptions, Eagerness, ElevenLabsSampleRate, ElevenLabsTTSOptions, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FillerWordsConfig, FillerWordsContent, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTTSOptions, FishAudioTts, FishAudioTtsParams, GeminiLiveOptions, GeminiOptions, GenerateConvoAITokenOptions, GenerateTokenOptions, GenericAvatarConfig, GenericAvatarOptions, GenericTTSOptions, GenericTts, GenericTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GlobalAvatarVendor, GlobalLlmVendor, GlobalSttVendor, GlobalTtsVendor, GoogleSTTOptions, GoogleTTSOptions, GoogleTts, GoogleTtsParams, GradiumTTSOptions, GradiumTts, GradiumTtsParams, GroqOptions, HeyGenAvatarConfig, HeyGenAvatarOptions, HeyGenSampleRate, HumeAITTSOptions, HumeAiTts, HumeAiTtsParams, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LiveAvatarAvatarConfig, LiveAvatarAvatarOptions, LiveAvatarSampleRate, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmPreset, LlmStyle, LlmVendor, McpServersItem, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MicrosoftSampleRate, MicrosoftSTTOptions, MicrosoftTTSOptions, MicrosoftTts, MicrosoftTtsParams, MiniMaxCNTTSOptions, MiniMaxTTSOptions, MinimaxTts, MinimaxTtsParams, MistralTTSOptions, MistralTts, MistralTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTTSOptions, MurfTts, MurfTtsParams, OpenAIOptions, OpenAIRealtimeOptions, OpenAISTTOptions, OpenAITTSOptions, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, PresetCategory, PresetInput, RimeTTSOptions, RimeTts, RimeTtsParams, RtcConfig, SalConfig, SalMode, SampleRate, SarvamSTTOptions, SarvamTTSOptions, SarvamTts, SarvamTtsParams, SayOptions, SensetimeAvatarConfig, SensetimeAvatarOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SpatiusAvatarConfig, SpatiusAvatarOptions, SpatiusAvatarParams, SpeakPriority, SpeechmaticsSTTOptions, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, StepFunTTSOptions, StrictAvatarConfig, SttConfig, SttVendor, TencentLLMOptions, TencentSTTOptions, TencentTTSOptions, ThinkOnListeningAction, ThinkOnSpeakingAction, ThinkOnThinkingAction, ThinkOptions, ThinkResponse, TtsConfig, TtsPreset, TtsVendor, TurnDetectionConfig, TurnDetectionLanguage, TurnDetectionNestedConfig, TurnDetectionType, VertexAILLMOptions, VertexAIOptions, XAiAsr, XAiAsrParams, XAiSTTOptions, XAiTTSOptions, XAiTts, XAiTtsParams, XaiGrokOptions, XfyunBigModelSTTOptions, XfyunDialectSTTOptions, XfyunSTTOptions, } from "./agentkit/index.js";
|
|
5
|
+
export { Agent, AgentPresets, AgentSession, AkoolAvatar, AliyunLLM, AmazonBedrock, AmazonSTT, AmazonTTS, AnamAvatar, Anthropic, AresSTT, AssemblyAISTT, AudioScenario, AzureOpenAI, BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNSTT, BaseCNTTS, BaseLLM, BaseMLLM, BaseSTT, BaseTTS, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CartesiaTTS, CosyVoiceTTS, CredentialMode, CustomLLM, DataChannel, DeepgramSTT, DeepgramTTS, DeepSeekLLM, Dify, ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioTTS, Gemini, GeminiLive, GenericAvatar, GenericTTS, Geofence, GoogleSTT, GoogleTTS, GradiumTTS, Groq, generateConvoAIToken, generateRtcToken, HeyGenAvatar, HumeAITTS, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, isSensetimeAvatar, isSpatiusAvatar, LiveAvatarAvatar, MAX_EXPIRY_SECONDS, MicrosoftCNSTT, MicrosoftCNTTS, MicrosoftSTT, MicrosoftTTS, MiniMaxCNTTS, MiniMaxTTS, MistralTTS, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, MurfTTS, normalizePresetInput, OpenAI, OpenAIRealtime, OpenAISTT, OpenAITTS, RimeTTS, SalModeValues, SarvamSTT, SarvamTTS, SensetimeAvatar, SilenceActionValues, SpatiusAvatar, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, SpeechmaticsSTT, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, ThinkOnListeningActionIgnore, ThinkOnListeningActionInject, ThinkOnListeningActionInterrupt, ThinkOnSpeakingActionIgnore, ThinkOnSpeakingActionInterrupt, ThinkOnThinkingActionIgnore, ThinkOnThinkingActionInterrupt, TurnDetectionTypeValues, toBaseAvatarConfig, VertexAI, VertexAILLM, validateAvatarConfig, validateTtsSampleRate, XAiSTT, XAiTTS, XaiGrok, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./agentkit/index.js";
|
|
6
6
|
export * as Agora from "./api/index.js";
|
|
7
7
|
export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
8
8
|
export { Area } from "./core/domain/index.js";
|
package/dist/cjs/index.js
CHANGED
|
@@ -36,9 +36,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.AgoraTimeoutError = exports.AgoraError = exports.AgoraEnvironment = exports.Area = exports.Agora = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.XaiGrok = exports.XAiTTS = exports.XAiSTT = exports.validateTtsSampleRate = exports.validateAvatarConfig = exports.VertexAILLM = exports.VertexAI = exports.toBaseAvatarConfig = exports.TurnDetectionTypeValues = exports.ThinkOnThinkingActionInterrupt = exports.ThinkOnThinkingActionIgnore = exports.ThinkOnSpeakingActionInterrupt = exports.ThinkOnSpeakingActionIgnore = exports.ThinkOnListeningActionInterrupt = exports.ThinkOnListeningActionInject = exports.ThinkOnListeningActionIgnore = void 0;
|
|
39
|
+
exports.Groq = exports.GradiumTTS = exports.GoogleTTS = exports.GoogleSTT = exports.Geofence = exports.GenericTTS = exports.GenericAvatar = exports.GeminiLive = exports.Gemini = exports.FishAudioTTS = exports.FillerWordsSelectionRule = exports.FengmingSTT = exports.ExpiresIn = exports.ElevenLabsTTS = exports.Dify = exports.DeepSeekLLM = exports.DeepgramTTS = exports.DeepgramSTT = exports.DataChannel = exports.CustomLLM = exports.CredentialMode = exports.CosyVoiceTTS = exports.CartesiaTTS = exports.BytedanceTTS = exports.BytedanceLLM = exports.BytedanceDuplexTTS = exports.BaseTTS = exports.BaseSTT = exports.BaseMLLM = exports.BaseLLM = exports.BaseCNTTS = exports.BaseCNSTT = exports.BaseCNLLM = exports.BaseCNAvatar = exports.BaseAvatar = exports.AzureOpenAI = exports.AudioScenario = exports.AssemblyAISTT = exports.AresSTT = exports.Anthropic = exports.AnamAvatar = exports.AmazonTTS = exports.AmazonSTT = exports.AmazonBedrock = exports.AliyunLLM = exports.AkoolAvatar = exports.AgentSession = exports.AgentPresets = exports.Agent = exports.AgoraClient = void 0;
|
|
40
|
+
exports.StepFunTTS = exports.SpeechmaticsSTT = exports.SpeakPriorityValues = exports.SpeakPriorityInterrupt = exports.SpeakPriorityIgnore = exports.SpeakPriorityAppend = exports.SpatiusAvatar = exports.SilenceActionValues = exports.SensetimeAvatar = exports.SarvamTTS = exports.SarvamSTT = exports.SalModeValues = exports.RimeTTS = exports.OpenAITTS = exports.OpenAISTT = exports.OpenAIRealtime = exports.OpenAI = exports.normalizePresetInput = exports.MurfTTS = exports.MllmTurnDetectionModeValues = exports.MllmTurnDetectionModeServerVad = exports.MllmTurnDetectionModeSemanticVad = exports.MllmTurnDetectionModeAgoraVad = exports.MistralTTS = exports.MiniMaxTTS = exports.MiniMaxCNTTS = exports.MicrosoftTTS = exports.MicrosoftSTT = exports.MicrosoftCNTTS = exports.MicrosoftCNSTT = exports.MAX_EXPIRY_SECONDS = exports.LiveAvatarAvatar = exports.isSpatiusAvatar = exports.isSensetimeAvatar = exports.isLiveAvatarAvatar = exports.isHeyGenAvatar = exports.isGenericAvatar = exports.isAvatarTokenManaged = exports.isAnamAvatar = exports.isAkoolAvatar = exports.InterruptionModeValues = exports.InterruptionModeStartOfSpeech = exports.InterruptionModeKeywords = exports.InterruptionDisabledStrategyIgnore = exports.InterruptionDisabledStrategyAppend = exports.InterruptionDisabledStrategy = exports.HumeAITTS = exports.HeyGenAvatar = exports.generateRtcToken = exports.generateConvoAIToken = void 0;
|
|
41
|
+
exports.AgoraTimeoutError = exports.AgoraError = exports.AgoraEnvironment = exports.Area = exports.Agora = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.XaiGrok = exports.XAiTTS = exports.XAiSTT = exports.validateTtsSampleRate = exports.validateAvatarConfig = exports.VertexAILLM = exports.VertexAI = exports.toBaseAvatarConfig = exports.TurnDetectionTypeValues = exports.ThinkOnThinkingActionInterrupt = exports.ThinkOnThinkingActionIgnore = exports.ThinkOnSpeakingActionInterrupt = exports.ThinkOnSpeakingActionIgnore = exports.ThinkOnListeningActionInterrupt = exports.ThinkOnListeningActionInject = exports.ThinkOnListeningActionIgnore = exports.TencentTTS = exports.TencentSTT = exports.TencentLLM = void 0;
|
|
42
42
|
var AgoraPoolClient_js_1 = require("./AgoraPoolClient.js");
|
|
43
43
|
Object.defineProperty(exports, "AgoraClient", { enumerable: true, get: function () { return AgoraPoolClient_js_1.AgoraClient; } });
|
|
44
44
|
// Agentkit layer exports - clean, ergonomic API
|
|
@@ -72,6 +72,7 @@ Object.defineProperty(exports, "BytedanceLLM", { enumerable: true, get: function
|
|
|
72
72
|
Object.defineProperty(exports, "BytedanceTTS", { enumerable: true, get: function () { return index_js_1.BytedanceTTS; } });
|
|
73
73
|
Object.defineProperty(exports, "CartesiaTTS", { enumerable: true, get: function () { return index_js_1.CartesiaTTS; } });
|
|
74
74
|
Object.defineProperty(exports, "CosyVoiceTTS", { enumerable: true, get: function () { return index_js_1.CosyVoiceTTS; } });
|
|
75
|
+
Object.defineProperty(exports, "CredentialMode", { enumerable: true, get: function () { return index_js_1.CredentialMode; } });
|
|
75
76
|
Object.defineProperty(exports, "CustomLLM", { enumerable: true, get: function () { return index_js_1.CustomLLM; } });
|
|
76
77
|
Object.defineProperty(exports, "DataChannel", { enumerable: true, get: function () { return index_js_1.DataChannel; } });
|
|
77
78
|
Object.defineProperty(exports, "DeepgramSTT", { enumerable: true, get: function () { return index_js_1.DeepgramSTT; } });
|
|
@@ -91,6 +92,7 @@ Object.defineProperty(exports, "GenericTTS", { enumerable: true, get: function (
|
|
|
91
92
|
Object.defineProperty(exports, "Geofence", { enumerable: true, get: function () { return index_js_1.Geofence; } });
|
|
92
93
|
Object.defineProperty(exports, "GoogleSTT", { enumerable: true, get: function () { return index_js_1.GoogleSTT; } });
|
|
93
94
|
Object.defineProperty(exports, "GoogleTTS", { enumerable: true, get: function () { return index_js_1.GoogleTTS; } });
|
|
95
|
+
Object.defineProperty(exports, "GradiumTTS", { enumerable: true, get: function () { return index_js_1.GradiumTTS; } });
|
|
94
96
|
Object.defineProperty(exports, "Groq", { enumerable: true, get: function () { return index_js_1.Groq; } });
|
|
95
97
|
Object.defineProperty(exports, "generateConvoAIToken", { enumerable: true, get: function () { return index_js_1.generateConvoAIToken; } });
|
|
96
98
|
Object.defineProperty(exports, "generateRtcToken", { enumerable: true, get: function () { return index_js_1.generateRtcToken; } });
|
|
@@ -119,6 +121,7 @@ Object.defineProperty(exports, "MicrosoftSTT", { enumerable: true, get: function
|
|
|
119
121
|
Object.defineProperty(exports, "MicrosoftTTS", { enumerable: true, get: function () { return index_js_1.MicrosoftTTS; } });
|
|
120
122
|
Object.defineProperty(exports, "MiniMaxCNTTS", { enumerable: true, get: function () { return index_js_1.MiniMaxCNTTS; } });
|
|
121
123
|
Object.defineProperty(exports, "MiniMaxTTS", { enumerable: true, get: function () { return index_js_1.MiniMaxTTS; } });
|
|
124
|
+
Object.defineProperty(exports, "MistralTTS", { enumerable: true, get: function () { return index_js_1.MistralTTS; } });
|
|
122
125
|
Object.defineProperty(exports, "MllmTurnDetectionModeAgoraVad", { enumerable: true, get: function () { return index_js_1.MllmTurnDetectionModeAgoraVad; } });
|
|
123
126
|
Object.defineProperty(exports, "MllmTurnDetectionModeSemanticVad", { enumerable: true, get: function () { return index_js_1.MllmTurnDetectionModeSemanticVad; } });
|
|
124
127
|
Object.defineProperty(exports, "MllmTurnDetectionModeServerVad", { enumerable: true, get: function () { return index_js_1.MllmTurnDetectionModeServerVad; } });
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "v2.
|
|
1
|
+
export declare const SDK_VERSION = "v2.5.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -5,8 +5,8 @@ export function normalizeClientOptions(options) {
|
|
|
5
5
|
const headers = mergeHeaders({
|
|
6
6
|
"X-Fern-Language": "JavaScript",
|
|
7
7
|
"X-Fern-SDK-Name": "agora-agents",
|
|
8
|
-
"X-Fern-SDK-Version": "v2.
|
|
9
|
-
"User-Agent": "agora-agents/v2.
|
|
8
|
+
"X-Fern-SDK-Version": "v2.5.0",
|
|
9
|
+
"User-Agent": "agora-agents/v2.5.0",
|
|
10
10
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
11
11
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
12
12
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -4,7 +4,7 @@ import { Agent } from "../Agent.mjs";
|
|
|
4
4
|
import { AliyunLLM, FengmingSTT, MiniMaxCNTTS } from "../vendors/cn.mjs";
|
|
5
5
|
import { OpenAI } from "../vendors/llm.mjs";
|
|
6
6
|
import { DeepgramSTT } from "../vendors/stt.mjs";
|
|
7
|
-
import { MiniMaxTTS } from "../vendors/tts.mjs";
|
|
7
|
+
import { GenericTTS, MiniMaxTTS } from "../vendors/tts.mjs";
|
|
8
8
|
const client = new AgoraClient({
|
|
9
9
|
area: Area.US,
|
|
10
10
|
appId: "app-id",
|
|
@@ -24,6 +24,8 @@ new Agent({ client, turnDetection: { language: "en-US" } })
|
|
|
24
24
|
new Agent({ client }).withStt(new FengmingSTT());
|
|
25
25
|
new Agent({ client }).withLlm(new AliyunLLM({ url: "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions", model: "qwen-plus" }));
|
|
26
26
|
new Agent({ client }).withTts(new MiniMaxCNTTS({ key: "minimax-key", model: "speech-01-turbo", voiceSetting: { voice_id: "female-shaonv" } }));
|
|
27
|
+
const globalGenericTts = new GenericTTS({ url: "https://tts.example.com/v1/audio/speech" });
|
|
28
|
+
new Agent({ client }).withTts(globalGenericTts);
|
|
27
29
|
{
|
|
28
30
|
const client = new AgoraClient({
|
|
29
31
|
area: Area.CN,
|
|
@@ -51,5 +53,7 @@ new Agent({ client }).withTts(new MiniMaxCNTTS({ key: "minimax-key", model: "spe
|
|
|
51
53
|
new Agent({ client }).withStt(new DeepgramSTT({ model: "nova-3", language: "en-US" }));
|
|
52
54
|
new Agent({ client }).withLlm(new OpenAI({ model: "gpt-5-mini" }));
|
|
53
55
|
new Agent({ client }).withTts(new MiniMaxTTS({ model: "speech-2.6-turbo", voiceId: "English_captivating_female1" }));
|
|
56
|
+
const cnGenericTts = new GenericTTS({ url: "https://tts.example.cn/v1/audio/speech" });
|
|
57
|
+
new Agent({ client }).withTts(cnGenericTts);
|
|
54
58
|
}
|
|
55
59
|
new Agent({ client }).withStt(new DeepgramSTT({ model: "nova-3", language: "en-US" }));
|
|
@@ -6,6 +6,12 @@ import { AgentThinkAgentManagementRequest as AgentThinkRequestNS } from "../api/
|
|
|
6
6
|
import { SpeakAgentsRequest as SpeakAgentsRequestNS } from "../api/resources/agents/client/requests/SpeakAgentsRequest.mjs";
|
|
7
7
|
import { StartAgentsRequest as StartAgentsRequestNS } from "../api/resources/agents/client/requests/StartAgentsRequest.mjs";
|
|
8
8
|
import { MllmTurnDetection as MllmTurnDetectionNS } from "../api/types/MllmTurnDetection.mjs";
|
|
9
|
+
/** Credential source for vendors that support Agora-managed credentials and BYOK. */
|
|
10
|
+
export declare const CredentialMode: {
|
|
11
|
+
readonly Managed: "managed";
|
|
12
|
+
readonly Byok: "byok";
|
|
13
|
+
};
|
|
14
|
+
export type CredentialMode = (typeof CredentialMode)[keyof typeof CredentialMode];
|
|
9
15
|
/** Data channel: `"rtm"` | `"datastream"` */
|
|
10
16
|
export declare const DataChannel: typeof StartAgentsRequestNS.Properties.Parameters.DataChannel;
|
|
11
17
|
/** RTC audio scenario: `"default"` | `"chorus"` | `"aiserver"` */
|
|
@@ -7,6 +7,11 @@ import { AgentThinkAgentManagementRequest as AgentThinkRequestNS } from "../api/
|
|
|
7
7
|
import { SpeakAgentsRequest as SpeakAgentsRequestNS } from "../api/resources/agents/client/requests/SpeakAgentsRequest.mjs";
|
|
8
8
|
import { StartAgentsRequest as StartAgentsRequestNS } from "../api/resources/agents/client/requests/StartAgentsRequest.mjs";
|
|
9
9
|
import { MllmTurnDetection as MllmTurnDetectionNS } from "../api/types/MllmTurnDetection.mjs";
|
|
10
|
+
/** Credential source for vendors that support Agora-managed credentials and BYOK. */
|
|
11
|
+
export const CredentialMode = {
|
|
12
|
+
Managed: "managed",
|
|
13
|
+
Byok: "byok",
|
|
14
|
+
};
|
|
10
15
|
/** Data channel: `"rtm"` | `"datastream"` */
|
|
11
16
|
export const DataChannel = StartAgentsRequestNS.Properties.Parameters.DataChannel;
|
|
12
17
|
/** RTC audio scenario: `"default"` | `"chorus"` | `"aiserver"` */
|
|
@@ -25,13 +25,13 @@ export type { AgentSessionEvent, AgentSessionEventHandler, AgentSessionOptions,
|
|
|
25
25
|
export { AgentSession } from "./AgentSession.mjs";
|
|
26
26
|
export type { AkoolAvatarConfig, AnamAvatarConfig, GenericAvatarConfig, HeyGenAvatarConfig, LiveAvatarAvatarConfig, SensetimeAvatarConfig, SpatiusAvatarConfig, StrictAvatarConfig, } from "./avatar-types.mjs";
|
|
27
27
|
export { isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, isSensetimeAvatar, isSpatiusAvatar, toBaseAvatarConfig, validateAvatarConfig, validateTtsSampleRate, } from "./avatar-types.mjs";
|
|
28
|
-
export { AudioScenario, DataChannel, FillerWordsSelectionRule, Geofence, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, SalModeValues, SilenceActionValues, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, ThinkOnListeningActionIgnore, ThinkOnListeningActionInject, ThinkOnListeningActionInterrupt, ThinkOnSpeakingActionIgnore, ThinkOnSpeakingActionInterrupt, ThinkOnThinkingActionIgnore, ThinkOnThinkingActionInterrupt, TurnDetectionTypeValues, } from "./constants.mjs";
|
|
28
|
+
export { AudioScenario, CredentialMode, DataChannel, FillerWordsSelectionRule, Geofence, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, SalModeValues, SilenceActionValues, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, ThinkOnListeningActionIgnore, ThinkOnListeningActionInject, ThinkOnListeningActionInterrupt, ThinkOnSpeakingActionIgnore, ThinkOnSpeakingActionInterrupt, ThinkOnThinkingActionIgnore, ThinkOnThinkingActionInterrupt, TurnDetectionTypeValues, } from "./constants.mjs";
|
|
29
29
|
export type { AgentPreset, AsrPreset, DeepgramPresetModel, LlmPreset, MiniMaxPresetModel, OpenAIPresetModel, OpenAITtsPresetModel, PresetCategory, PresetInput, TtsPreset, } from "./presets.mjs";
|
|
30
30
|
export { AgentPresets, normalizePresetInput } from "./presets.mjs";
|
|
31
31
|
export type { AvatarVendor, CNAvatarVendor, CNLlmVendor, CNSttVendor, CNTtsVendor, GlobalAvatarVendor, GlobalLlmVendor, GlobalSttVendor, GlobalTtsVendor, LlmVendor, SttVendor, TtsVendor, } from "./region-vendors.mjs";
|
|
32
32
|
export type { GenerateConvoAITokenOptions, GenerateTokenOptions, } from "./token.mjs";
|
|
33
33
|
export { ExpiresIn, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.mjs";
|
|
34
|
-
export type { AdvancedFeatures, AgentConfig, AgentConfigUpdate, AmazonTts, AmazonTtsParams, AsrConfig, AsrVendorName, AvatarConfig, AvatarWireVendor, CartesiaTts, CartesiaTtsParams, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, Eagerness, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FillerWordsConfig, FillerWordsContent, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTts, FishAudioTtsParams, GenericTts, GenericTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GoogleTts, GoogleTtsParams, HumeAiTts, HumeAiTtsParams, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmStyle, McpServersItem, MicrosoftTts, MicrosoftTtsParams, MinimaxTts, MinimaxTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTts, MurfTtsParams, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, RimeTts, RimeTtsParams, RtcConfig, SalConfig, SalMode, SarvamTts, SarvamTtsParams, SayOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SpatiusAvatarParams, SpeakPriority, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, SttConfig, ThinkOnListeningAction, ThinkOnSpeakingAction, ThinkOnThinkingAction, ThinkOptions, ThinkResponse, TtsConfig, TurnDetectionConfig, TurnDetectionLanguage, TurnDetectionNestedConfig, TurnDetectionType, XAiAsr, XAiAsrParams, XAiTts, XAiTtsParams, } from "./types.mjs";
|
|
34
|
+
export type { AdvancedFeatures, AgentConfig, AgentConfigUpdate, AmazonTts, AmazonTtsParams, AsrConfig, AsrVendorName, AvatarConfig, AvatarWireVendor, CartesiaTts, CartesiaTtsParams, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, Eagerness, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FillerWordsConfig, FillerWordsContent, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTts, FishAudioTtsParams, GenericTts, GenericTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GoogleTts, GoogleTtsParams, GradiumTts, GradiumTtsParams, HumeAiTts, HumeAiTtsParams, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmStyle, McpServersItem, MicrosoftTts, MicrosoftTtsParams, MinimaxTts, MinimaxTtsParams, MistralTts, MistralTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTts, MurfTtsParams, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, RimeTts, RimeTtsParams, RtcConfig, SalConfig, SalMode, SarvamTts, SarvamTtsParams, SayOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SpatiusAvatarParams, SpeakPriority, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, SttConfig, ThinkOnListeningAction, ThinkOnSpeakingAction, ThinkOnThinkingAction, ThinkOptions, ThinkResponse, TtsConfig, TurnDetectionConfig, TurnDetectionLanguage, TurnDetectionNestedConfig, TurnDetectionType, XAiAsr, XAiAsrParams, XAiTts, XAiTtsParams, } from "./types.mjs";
|
|
35
35
|
export type { AkoolAvatarOptions, AnamAvatarOptions, GenericAvatarOptions, HeyGenAvatarOptions, LiveAvatarAvatarOptions, } from "./vendors/avatar.mjs";
|
|
36
36
|
export { AkoolAvatar, AnamAvatar, GenericAvatar, HeyGenAvatar, LiveAvatarAvatar, } from "./vendors/avatar.mjs";
|
|
37
37
|
export type { AkoolSampleRate, CartesiaSampleRate, ElevenLabsSampleRate, HeyGenSampleRate, LiveAvatarSampleRate, MicrosoftSampleRate, SampleRate, } from "./vendors/base.mjs";
|
|
@@ -44,5 +44,5 @@ export type { GeminiLiveOptions, OpenAIRealtimeOptions, VertexAIOptions, XaiGrok
|
|
|
44
44
|
export { GeminiLive, OpenAIRealtime, VertexAI, XaiGrok, } from "./vendors/mllm.mjs";
|
|
45
45
|
export type { AmazonSTTOptions, AresSTTOptions, AssemblyAISTTOptions, DeepgramSTTOptions, GoogleSTTOptions, MicrosoftSTTOptions, OpenAISTTOptions, SarvamSTTOptions, SpeechmaticsSTTOptions, XAiSTTOptions, } from "./vendors/stt.mjs";
|
|
46
46
|
export { AmazonSTT, AresSTT, AssemblyAISTT, DeepgramSTT, GoogleSTT, MicrosoftSTT, OpenAISTT, SarvamSTT, SpeechmaticsSTT, XAiSTT, } from "./vendors/stt.mjs";
|
|
47
|
-
export type { AmazonTTSOptions, CartesiaTTSOptions, DeepgramTTSOptions, ElevenLabsTTSOptions, FishAudioTTSOptions, GenericTTSOptions, GoogleTTSOptions, HumeAITTSOptions, MicrosoftTTSOptions, MiniMaxTTSOptions, MurfTTSOptions, OpenAITTSOptions, RimeTTSOptions, SarvamTTSOptions, XAiTTSOptions, } from "./vendors/tts.mjs";
|
|
48
|
-
export { AmazonTTS, CartesiaTTS, DeepgramTTS, ElevenLabsTTS, FishAudioTTS, GenericTTS, GoogleTTS, HumeAITTS, MicrosoftTTS, MiniMaxTTS, MurfTTS, OpenAITTS, RimeTTS, SarvamTTS, XAiTTS, } from "./vendors/tts.mjs";
|
|
47
|
+
export type { AmazonTTSOptions, CartesiaTTSOptions, DeepgramTTSOptions, ElevenLabsTTSOptions, FishAudioTTSOptions, GenericTTSOptions, GoogleTTSOptions, GradiumTTSOptions, HumeAITTSOptions, MicrosoftTTSOptions, MiniMaxTTSOptions, MistralTTSOptions, MurfTTSOptions, OpenAITTSOptions, RimeTTSOptions, SarvamTTSOptions, XAiTTSOptions, } from "./vendors/tts.mjs";
|
|
48
|
+
export { AmazonTTS, CartesiaTTS, DeepgramTTS, ElevenLabsTTS, FishAudioTTS, GenericTTS, GoogleTTS, GradiumTTS, HumeAITTS, MicrosoftTTS, MiniMaxTTS, MistralTTS, MurfTTS, OpenAITTS, RimeTTS, SarvamTTS, XAiTTS, } from "./vendors/tts.mjs";
|
|
@@ -23,7 +23,7 @@ export { Agent } from "./Agent.mjs";
|
|
|
23
23
|
export { AgentSession } from "./AgentSession.mjs";
|
|
24
24
|
export { isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, isSensetimeAvatar, isSpatiusAvatar, toBaseAvatarConfig, validateAvatarConfig, validateTtsSampleRate, } from "./avatar-types.mjs";
|
|
25
25
|
// Type-safe constants
|
|
26
|
-
export { AudioScenario, DataChannel, FillerWordsSelectionRule, Geofence, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, SalModeValues, SilenceActionValues, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, ThinkOnListeningActionIgnore, ThinkOnListeningActionInject, ThinkOnListeningActionInterrupt, ThinkOnSpeakingActionIgnore, ThinkOnSpeakingActionInterrupt, ThinkOnThinkingActionIgnore, ThinkOnThinkingActionInterrupt, TurnDetectionTypeValues, } from "./constants.mjs";
|
|
26
|
+
export { AudioScenario, CredentialMode, DataChannel, FillerWordsSelectionRule, Geofence, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, SalModeValues, SilenceActionValues, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, ThinkOnListeningActionIgnore, ThinkOnListeningActionInject, ThinkOnListeningActionInterrupt, ThinkOnSpeakingActionIgnore, ThinkOnSpeakingActionInterrupt, ThinkOnThinkingActionIgnore, ThinkOnThinkingActionInterrupt, TurnDetectionTypeValues, } from "./constants.mjs";
|
|
27
27
|
export { AgentPresets, normalizePresetInput } from "./presets.mjs";
|
|
28
28
|
// Token generation
|
|
29
29
|
export { ExpiresIn, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.mjs";
|
|
@@ -39,4 +39,4 @@ export { GeminiLive, OpenAIRealtime, VertexAI, XaiGrok, } from "./vendors/mllm.m
|
|
|
39
39
|
// STT vendor classes
|
|
40
40
|
export { AmazonSTT, AresSTT, AssemblyAISTT, DeepgramSTT, GoogleSTT, MicrosoftSTT, OpenAISTT, SarvamSTT, SpeechmaticsSTT, XAiSTT, } from "./vendors/stt.mjs";
|
|
41
41
|
// TTS vendor classes
|
|
42
|
-
export { AmazonTTS, CartesiaTTS, DeepgramTTS, ElevenLabsTTS, FishAudioTTS, GenericTTS, GoogleTTS, HumeAITTS, MicrosoftTTS, MiniMaxTTS, MurfTTS, OpenAITTS, RimeTTS, SarvamTTS, XAiTTS, } from "./vendors/tts.mjs";
|
|
42
|
+
export { AmazonTTS, CartesiaTTS, DeepgramTTS, ElevenLabsTTS, FishAudioTTS, GenericTTS, GoogleTTS, GradiumTTS, HumeAITTS, MicrosoftTTS, MiniMaxTTS, MistralTTS, MurfTTS, OpenAITTS, RimeTTS, SarvamTTS, XAiTTS, } from "./vendors/tts.mjs";
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNSTT, BaseCNTTS, BaseLLM, BaseSTT, BaseTTS } from "./vendors/base.mjs";
|
|
2
2
|
import type { MicrosoftCNSampleRate, MicrosoftCNSTT, MicrosoftCNTTS } from "./vendors/cn.mjs";
|
|
3
3
|
import type { CustomLLM } from "./vendors/llm.mjs";
|
|
4
|
+
import type { GenericTTS } from "./vendors/tts.mjs";
|
|
4
5
|
export type GlobalLlmVendor = BaseLLM;
|
|
5
6
|
export type GlobalTtsVendor<SR extends number = number> = BaseTTS<SR>;
|
|
6
7
|
export type GlobalSttVendor = BaseSTT;
|
|
7
8
|
export type GlobalAvatarVendor<SR extends number = number> = BaseAvatar<SR>;
|
|
8
9
|
export type CNLlmVendor = BaseCNLLM | CustomLLM;
|
|
9
|
-
export type CNTtsVendor<SR extends number = number> = BaseCNTTS<SR> | (SR extends MicrosoftCNSampleRate ? MicrosoftCNTTS<SR> : never);
|
|
10
|
+
export type CNTtsVendor<SR extends number = number> = BaseCNTTS<SR> | GenericTTS | (SR extends MicrosoftCNSampleRate ? MicrosoftCNTTS<SR> : never);
|
|
10
11
|
export type CNSttVendor = BaseCNSTT | MicrosoftCNSTT;
|
|
11
12
|
export type CNAvatarVendor<SR extends number = number> = BaseCNAvatar<SR>;
|
|
12
13
|
export type LlmVendor = GlobalLlmVendor | CNLlmVendor;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Clean type aliases for the Agora Conversational AI SDK.
|
|
3
3
|
* These provide shorter, more intuitive names for the verbose Fern-generated types.
|
|
4
4
|
*/
|
|
5
|
-
import type { AgentThinkAgentManagementResponse, AmazonTtsParams as AmazonTtsParamsType, AmazonTts as AmazonTtsType, Asr, AsrLanguage, CartesiaTtsParams as CartesiaTtsParamsType, CartesiaTts as CartesiaTtsType, ElevenLabsTtsParams as ElevenLabsTtsParamsType, ElevenLabsTts as ElevenLabsTtsType, FishAudioTtsParams as FishAudioTtsParamsType, FishAudioTts as FishAudioTtsType,
|
|
5
|
+
import type { AgentThinkAgentManagementResponse, AmazonTtsParams as AmazonTtsParamsType, AmazonTts as AmazonTtsType, Asr, AsrLanguage, CartesiaTtsParams as CartesiaTtsParamsType, CartesiaTts as CartesiaTtsType, ElevenLabsTtsParams as ElevenLabsTtsParamsType, ElevenLabsTts as ElevenLabsTtsType, FishAudioTtsParams as FishAudioTtsParamsType, FishAudioTts as FishAudioTtsType, GenericHttpTtsParams as GenericTtsParamsType, GenericHttpTts as GenericTtsType, GetAgentsResponse, GetHistoryAgentsResponse, GetTurnsAgentsResponse, GoogleTtsParams as GoogleTtsParamsType, GoogleTts as GoogleTtsType, GradiumTtsParams as GradiumTtsParamsType, GradiumTts as GradiumTtsType, HumeAiTtsParams as HumeAiTtsParamsType, HumeAiTts as HumeAiTtsType, ListAgentsResponse, Llm, MicrosoftTtsParams as MicrosoftTtsParamsType, MicrosoftTts as MicrosoftTtsType, MinimaxTtsParams as MinimaxTtsParamsType, MinimaxTts as MinimaxTtsType, MistralTtsParams as MistralTtsParamsType, MistralTts as MistralTtsType, Mllm, MllmTurnDetection, MllmTurnDetection as MllmTurnDetectionNS, MurfTtsParams as MurfTtsParamsType, MurfTts as MurfTtsType, OpenAiTtsParams as OpenAiTtsParamsType, OpenAiTts as OpenAiTtsType, RimeTtsParams as RimeTtsParamsType, RimeTts as RimeTtsType, SarvamTtsParams as SarvamTtsParamsType, SarvamTts as SarvamTtsType, SpatiusAvatarParams as SpatiusAvatarParamsType, SpeakAgentsRequest, StartAgentsRequest, Tts, UpdateAgentsRequest, XAiAsrParams as XAiAsrParamsType, XAiAsr as XAiAsrType, XAiTtsParams as XAiTtsParamsType, XAiTts as XAiTtsType } from "../api/index.mjs";
|
|
6
6
|
import type { AgentThinkAgentManagementRequest } from "../api/resources/agentManagement/client/requests/AgentThinkAgentManagementRequest.mjs";
|
|
7
7
|
import type { PresetInput } from "./presets.mjs";
|
|
8
8
|
/** LLM request style (openai, gemini, anthropic, dify) */
|
|
@@ -558,10 +558,14 @@ export type GenericTts = GenericTtsType;
|
|
|
558
558
|
export type GenericTtsParams = GenericTtsParamsType;
|
|
559
559
|
export type GoogleTts = GoogleTtsType;
|
|
560
560
|
export type GoogleTtsParams = GoogleTtsParamsType;
|
|
561
|
+
export type GradiumTts = GradiumTtsType;
|
|
562
|
+
export type GradiumTtsParams = GradiumTtsParamsType;
|
|
561
563
|
export type AmazonTts = AmazonTtsType;
|
|
562
564
|
export type AmazonTtsParams = AmazonTtsParamsType;
|
|
563
565
|
export type MinimaxTts = MinimaxTtsType;
|
|
564
566
|
export type MinimaxTtsParams = MinimaxTtsParamsType;
|
|
567
|
+
export type MistralTts = MistralTtsType;
|
|
568
|
+
export type MistralTtsParams = MistralTtsParamsType;
|
|
565
569
|
export type MurfTts = MurfTtsType;
|
|
566
570
|
export type MurfTtsParams = MurfTtsParamsType;
|
|
567
571
|
export type SarvamTts = SarvamTtsType;
|
|
@@ -21,7 +21,7 @@ export interface OpenAIRealtimeOptions {
|
|
|
21
21
|
instructions?: string;
|
|
22
22
|
/** Audio transcription settings */
|
|
23
23
|
inputAudioTranscription?: Record<string, unknown>;
|
|
24
|
-
/** WebSocket URL
|
|
24
|
+
/** WebSocket URL. Defaults to `wss://api.openai.com/v1/realtime` when omitted or empty. */
|
|
25
25
|
url?: string;
|
|
26
26
|
/** Agent greeting message */
|
|
27
27
|
greetingMessage?: string;
|
|
@@ -36,7 +36,7 @@ export class OpenAIRealtime extends BaseMLLM {
|
|
|
36
36
|
voice !== undefined ||
|
|
37
37
|
instructions !== undefined ||
|
|
38
38
|
inputAudioTranscription !== undefined;
|
|
39
|
-
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(
|
|
39
|
+
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ vendor: "openai", api_key: apiKey, url: url || "wss://api.openai.com/v1/realtime" }, (hasParams && { params: mergedParams })), (greetingMessage && { greeting_message: greetingMessage })), (inputModalities && { input_modalities: inputModalities })), (outputModalities && { output_modalities: outputModalities })), (messages && { messages })), (this.options.failureMessage && { failure_message: this.options.failureMessage })), (turnDetection && { turn_detection: turnDetection }));
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Type-safe TTS (Text-to-Speech) vendor classes.
|
|
3
3
|
*/
|
|
4
|
+
import { CredentialMode } from "../constants.mjs";
|
|
4
5
|
import { type MiniMaxPresetModel, type OpenAITtsPresetModel } from "../presets.mjs";
|
|
5
6
|
import type { TtsConfig } from "../types.mjs";
|
|
6
7
|
import type { CartesiaSampleRate, ElevenLabsSampleRate, GoogleTTSSampleRate, MicrosoftSampleRate } from "./base.mjs";
|
|
@@ -279,6 +280,48 @@ export declare class DeepgramTTS extends BaseTTS {
|
|
|
279
280
|
constructor(options: DeepgramTTSOptions);
|
|
280
281
|
toConfig(): TtsConfig;
|
|
281
282
|
}
|
|
283
|
+
/** Constructor options for Gradium TTS. */
|
|
284
|
+
export interface GradiumTTSOptions {
|
|
285
|
+
/** Gradium API key */
|
|
286
|
+
apiKey: string;
|
|
287
|
+
/** WebSocket endpoint for streaming TTS output */
|
|
288
|
+
url?: string;
|
|
289
|
+
/** Gradium TTS model name (e.g., 'default') */
|
|
290
|
+
modelName?: string;
|
|
291
|
+
/** Gradium voice identifier */
|
|
292
|
+
voiceId?: string;
|
|
293
|
+
/** Audio sample rate in Hz */
|
|
294
|
+
sampleRate?: number;
|
|
295
|
+
/** Additional vendor-specific parameters */
|
|
296
|
+
additionalParams?: Record<string, unknown>;
|
|
297
|
+
/** Skip patterns for bracketed content */
|
|
298
|
+
skipPatterns?: number[];
|
|
299
|
+
}
|
|
300
|
+
/** Gradium TTS vendor. */
|
|
301
|
+
export declare class GradiumTTS extends BaseTTS {
|
|
302
|
+
private readonly options;
|
|
303
|
+
constructor(options: GradiumTTSOptions);
|
|
304
|
+
toConfig(): TtsConfig;
|
|
305
|
+
}
|
|
306
|
+
/** Constructor options for Mistral TTS. */
|
|
307
|
+
export interface MistralTTSOptions {
|
|
308
|
+
/** Mistral API key */
|
|
309
|
+
apiKey: string;
|
|
310
|
+
/** Mistral TTS model name (e.g., 'voxtral-mini-tts-2603') */
|
|
311
|
+
model?: string;
|
|
312
|
+
/** Mistral voice identifier */
|
|
313
|
+
voice?: string;
|
|
314
|
+
/** Additional vendor-specific parameters */
|
|
315
|
+
additionalParams?: Record<string, unknown>;
|
|
316
|
+
/** Skip patterns for bracketed content */
|
|
317
|
+
skipPatterns?: number[];
|
|
318
|
+
}
|
|
319
|
+
/** Mistral TTS vendor. */
|
|
320
|
+
export declare class MistralTTS extends BaseTTS {
|
|
321
|
+
private readonly options;
|
|
322
|
+
constructor(options: MistralTTSOptions);
|
|
323
|
+
toConfig(): TtsConfig;
|
|
324
|
+
}
|
|
282
325
|
/**
|
|
283
326
|
* Constructor options for Hume AI TTS.
|
|
284
327
|
*/
|
|
@@ -319,8 +362,28 @@ export declare class HumeAITTS extends BaseTTS {
|
|
|
319
362
|
}
|
|
320
363
|
/**
|
|
321
364
|
* Constructor options for Rime TTS.
|
|
365
|
+
*
|
|
366
|
+
* - `credentialMode: CredentialMode.Managed` requires `baseUrl` and `modelId`
|
|
367
|
+
* - omitted / `CredentialMode.Byok` requires `key`, `speaker`, and `modelId`
|
|
322
368
|
*/
|
|
323
|
-
|
|
369
|
+
type RimeTTSCommonOptions = {
|
|
370
|
+
/** Skip patterns for bracketed content */
|
|
371
|
+
skipPatterns?: number[];
|
|
372
|
+
};
|
|
373
|
+
export type RimeTTSOptions = (RimeTTSCommonOptions & {
|
|
374
|
+
/** Use Agora-managed Rime credentials */
|
|
375
|
+
credentialMode: typeof CredentialMode.Managed;
|
|
376
|
+
/** Model ID */
|
|
377
|
+
modelId: string;
|
|
378
|
+
/** WebSocket URL for the Rime streaming API */
|
|
379
|
+
baseUrl: string;
|
|
380
|
+
/** Rime API key (optional for managed credentials) */
|
|
381
|
+
key?: string;
|
|
382
|
+
/** Speaker ID (optional for managed credentials) */
|
|
383
|
+
speaker?: string;
|
|
384
|
+
}) | (RimeTTSCommonOptions & {
|
|
385
|
+
/** Bring-your-own Rime credentials (default when omitted) */
|
|
386
|
+
credentialMode?: typeof CredentialMode.Byok;
|
|
324
387
|
/** Rime API key */
|
|
325
388
|
key: string;
|
|
326
389
|
/** Speaker ID */
|
|
@@ -329,15 +392,24 @@ export interface RimeTTSOptions {
|
|
|
329
392
|
modelId: string;
|
|
330
393
|
/** WebSocket URL for the Rime streaming API */
|
|
331
394
|
baseUrl?: string;
|
|
332
|
-
|
|
333
|
-
skipPatterns?: number[];
|
|
334
|
-
}
|
|
395
|
+
});
|
|
335
396
|
/**
|
|
336
397
|
* Rime TTS vendor.
|
|
337
398
|
*
|
|
338
399
|
* @example
|
|
400
|
+
* Agora-managed credentials:
|
|
339
401
|
* ```typescript
|
|
340
|
-
* const
|
|
402
|
+
* const managedTts = new RimeTTS({
|
|
403
|
+
* credentialMode: CredentialMode.Managed,
|
|
404
|
+
* baseUrl: 'wss://users.rime.ai/ws',
|
|
405
|
+
* modelId: 'mist',
|
|
406
|
+
* });
|
|
407
|
+
* ```
|
|
408
|
+
*
|
|
409
|
+
* @example
|
|
410
|
+
* Bring your own credentials (the default mode):
|
|
411
|
+
* ```typescript
|
|
412
|
+
* const byokTts = new RimeTTS({
|
|
341
413
|
* key: process.env.RIME_API_KEY,
|
|
342
414
|
* speaker: 'speaker-id',
|
|
343
415
|
* modelId: 'mist',
|
|
@@ -505,16 +577,16 @@ export declare class MurfTTS extends BaseTTS {
|
|
|
505
577
|
* Constructor options for Generic OpenAI-compatible TTS.
|
|
506
578
|
*/
|
|
507
579
|
export interface GenericTTSOptions {
|
|
508
|
-
/**
|
|
580
|
+
/** HTTP(S) endpoint of the generic TTS service */
|
|
509
581
|
url: string;
|
|
510
582
|
/** Custom headers to include in requests to the generic TTS service */
|
|
511
|
-
headers
|
|
583
|
+
headers?: Record<string, string>;
|
|
512
584
|
/** API key for the generic TTS service */
|
|
513
585
|
apiKey?: string;
|
|
514
586
|
/** TTS model name */
|
|
515
|
-
model
|
|
587
|
+
model?: string;
|
|
516
588
|
/** Voice name */
|
|
517
|
-
voice
|
|
589
|
+
voice?: string;
|
|
518
590
|
/** Speech rate */
|
|
519
591
|
speed?: number;
|
|
520
592
|
/** Output audio sample rate in Hz */
|