agora-agents 2.13.0 → 2.14.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/AgentSession.js +8 -5
- package/dist/cjs/agentkit/index.d.ts +7 -6
- package/dist/cjs/agentkit/index.js +7 -3
- package/dist/cjs/agentkit/token.d.ts +38 -3
- package/dist/cjs/agentkit/token.js +28 -1
- package/dist/cjs/agentkit/vendors/cn.d.ts +34 -0
- package/dist/cjs/agentkit/vendors/cn.js +33 -1
- package/dist/cjs/agentkit/vendors/tts.d.ts +22 -0
- package/dist/cjs/agentkit/vendors/tts.js +17 -1
- package/dist/cjs/api/types/Asr.d.ts +4 -1
- package/dist/cjs/api/types/MinimaxDuplexTts.d.ts +13 -0
- package/dist/cjs/api/types/MinimaxDuplexTts.js +3 -0
- package/dist/cjs/api/types/MinimaxDuplexTtsParams.d.ts +87 -0
- package/dist/cjs/api/types/MinimaxDuplexTtsParams.js +3 -0
- package/dist/cjs/api/types/SonioxTts.d.ts +9 -0
- package/dist/cjs/api/types/SonioxTts.js +3 -0
- package/dist/cjs/api/types/SonioxTtsParams.d.ts +29 -0
- package/dist/cjs/api/types/SonioxTtsParams.js +3 -0
- package/dist/cjs/api/types/StepfunAsr.d.ts +10 -0
- package/dist/cjs/api/types/StepfunAsr.js +3 -0
- package/dist/cjs/api/types/StepfunAsrParams.d.ts +9 -0
- package/dist/cjs/api/types/StepfunAsrParams.js +3 -0
- package/dist/cjs/api/types/Tts.d.ts +7 -1
- package/dist/cjs/api/types/index.d.ts +6 -0
- package/dist/cjs/api/types/index.js +6 -0
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +7 -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/AgentSession.mjs +8 -5
- package/dist/esm/agentkit/index.d.mts +7 -6
- package/dist/esm/agentkit/index.mjs +3 -3
- package/dist/esm/agentkit/token.d.mts +38 -3
- package/dist/esm/agentkit/token.mjs +27 -1
- package/dist/esm/agentkit/vendors/cn.d.mts +34 -0
- package/dist/esm/agentkit/vendors/cn.mjs +30 -0
- package/dist/esm/agentkit/vendors/tts.d.mts +22 -0
- package/dist/esm/agentkit/vendors/tts.mjs +15 -0
- package/dist/esm/api/types/Asr.d.mts +4 -1
- package/dist/esm/api/types/MinimaxDuplexTts.d.mts +13 -0
- package/dist/esm/api/types/MinimaxDuplexTts.mjs +2 -0
- package/dist/esm/api/types/MinimaxDuplexTtsParams.d.mts +87 -0
- package/dist/esm/api/types/MinimaxDuplexTtsParams.mjs +2 -0
- package/dist/esm/api/types/SonioxTts.d.mts +9 -0
- package/dist/esm/api/types/SonioxTts.mjs +2 -0
- package/dist/esm/api/types/SonioxTtsParams.d.mts +29 -0
- package/dist/esm/api/types/SonioxTtsParams.mjs +2 -0
- package/dist/esm/api/types/StepfunAsr.d.mts +10 -0
- package/dist/esm/api/types/StepfunAsr.mjs +2 -0
- package/dist/esm/api/types/StepfunAsrParams.d.mts +9 -0
- package/dist/esm/api/types/StepfunAsrParams.mjs +2 -0
- package/dist/esm/api/types/Tts.d.mts +7 -1
- package/dist/esm/api/types/index.d.mts +6 -0
- package/dist/esm/api/types/index.mjs +6 -0
- package/dist/esm/index.d.mts +2 -2
- package/dist/esm/index.mjs +4 -4
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
|
@@ -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.Gemini | 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 | Agora.Tts.Typecast | Agora.Tts.Smallestai;
|
|
2
|
+
export type Tts = Agora.Tts.Tencent | Agora.Tts.Bytedance | Agora.Tts.Microsoft | Agora.Tts.Elevenlabs | Agora.Tts.Minimax | Agora.Tts.MinimaxDuplex | Agora.Tts.Murf | Agora.Tts.Cartesia | Agora.Tts.Openai | Agora.Tts.Humeai | Agora.Tts.Rime | Agora.Tts.Fishaudio | Agora.Tts.Google | Agora.Tts.Gemini | 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 | Agora.Tts.Typecast | Agora.Tts.Smallestai | Agora.Tts.Soniox;
|
|
3
3
|
export declare namespace Tts {
|
|
4
4
|
interface Tencent extends Agora.TencentTts {
|
|
5
5
|
vendor: "tencent";
|
|
@@ -16,6 +16,9 @@ export declare namespace Tts {
|
|
|
16
16
|
interface Minimax extends Agora.MinimaxTts {
|
|
17
17
|
vendor: "minimax";
|
|
18
18
|
}
|
|
19
|
+
interface MinimaxDuplex extends Agora.MinimaxDuplexTts {
|
|
20
|
+
vendor: "minimax_duplex";
|
|
21
|
+
}
|
|
19
22
|
interface Murf extends Agora.MurfTts {
|
|
20
23
|
vendor: "murf";
|
|
21
24
|
}
|
|
@@ -76,4 +79,7 @@ export declare namespace Tts {
|
|
|
76
79
|
interface Smallestai extends Agora.SmallestAiTts {
|
|
77
80
|
vendor: "smallestai";
|
|
78
81
|
}
|
|
82
|
+
interface Soniox extends Agora.SonioxTts {
|
|
83
|
+
vendor: "soniox";
|
|
84
|
+
}
|
|
79
85
|
}
|
|
@@ -57,6 +57,8 @@ export * from "./MicrosoftAsr.js";
|
|
|
57
57
|
export * from "./MicrosoftAsrParams.js";
|
|
58
58
|
export * from "./MicrosoftTts.js";
|
|
59
59
|
export * from "./MicrosoftTtsParams.js";
|
|
60
|
+
export * from "./MinimaxDuplexTts.js";
|
|
61
|
+
export * from "./MinimaxDuplexTtsParams.js";
|
|
60
62
|
export * from "./MinimaxTts.js";
|
|
61
63
|
export * from "./MinimaxTtsParams.js";
|
|
62
64
|
export * from "./MistralTts.js";
|
|
@@ -86,9 +88,13 @@ export * from "./SmallestAiAsr.js";
|
|
|
86
88
|
export * from "./SmallestAiAsrParams.js";
|
|
87
89
|
export * from "./SmallestAiTts.js";
|
|
88
90
|
export * from "./SmallestAiTtsParams.js";
|
|
91
|
+
export * from "./SonioxTts.js";
|
|
92
|
+
export * from "./SonioxTtsParams.js";
|
|
89
93
|
export * from "./SpatiusAvatarParams.js";
|
|
90
94
|
export * from "./SpeechmaticsAsr.js";
|
|
91
95
|
export * from "./SpeechmaticsAsrParams.js";
|
|
96
|
+
export * from "./StepfunAsr.js";
|
|
97
|
+
export * from "./StepfunAsrParams.js";
|
|
92
98
|
export * from "./StepfunTts.js";
|
|
93
99
|
export * from "./StepfunTtsParams.js";
|
|
94
100
|
export * from "./TelephonyErrorResponse.js";
|
|
@@ -73,6 +73,8 @@ __exportStar(require("./MicrosoftAsr.js"), exports);
|
|
|
73
73
|
__exportStar(require("./MicrosoftAsrParams.js"), exports);
|
|
74
74
|
__exportStar(require("./MicrosoftTts.js"), exports);
|
|
75
75
|
__exportStar(require("./MicrosoftTtsParams.js"), exports);
|
|
76
|
+
__exportStar(require("./MinimaxDuplexTts.js"), exports);
|
|
77
|
+
__exportStar(require("./MinimaxDuplexTtsParams.js"), exports);
|
|
76
78
|
__exportStar(require("./MinimaxTts.js"), exports);
|
|
77
79
|
__exportStar(require("./MinimaxTtsParams.js"), exports);
|
|
78
80
|
__exportStar(require("./MistralTts.js"), exports);
|
|
@@ -102,9 +104,13 @@ __exportStar(require("./SmallestAiAsr.js"), exports);
|
|
|
102
104
|
__exportStar(require("./SmallestAiAsrParams.js"), exports);
|
|
103
105
|
__exportStar(require("./SmallestAiTts.js"), exports);
|
|
104
106
|
__exportStar(require("./SmallestAiTtsParams.js"), exports);
|
|
107
|
+
__exportStar(require("./SonioxTts.js"), exports);
|
|
108
|
+
__exportStar(require("./SonioxTtsParams.js"), exports);
|
|
105
109
|
__exportStar(require("./SpatiusAvatarParams.js"), exports);
|
|
106
110
|
__exportStar(require("./SpeechmaticsAsr.js"), exports);
|
|
107
111
|
__exportStar(require("./SpeechmaticsAsrParams.js"), exports);
|
|
112
|
+
__exportStar(require("./StepfunAsr.js"), exports);
|
|
113
|
+
__exportStar(require("./StepfunAsrParams.js"), exports);
|
|
108
114
|
__exportStar(require("./StepfunTts.js"), exports);
|
|
109
115
|
__exportStar(require("./StepfunTtsParams.js"), exports);
|
|
110
116
|
__exportStar(require("./TelephonyErrorResponse.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, AzureOpenAIRealtimeOptions, AzureOpenAIRealtimeParams, BaseMllmOptions, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CartesiaSampleRate, CartesiaTTSOptions, CartesiaTts, CartesiaTtsParams, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, CustomLLMOptions, DeepgramSTTOptions, DeepgramTTSOptions, DeepSeekLLMOptions, DifyOptions, Eagerness, ElevenLabsSampleRate, ElevenLabsTTSOptions, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FengmingSTTOptions, FillerWordsConfig, FillerWordsContent, FillerWordsContentGeneratedConfig, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsGeneratedLlmProvider, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTTSOptions, FishAudioTts, FishAudioTtsParams, GeminiAsrParams, GeminiLiveModel, GeminiLiveOptions, GeminiLiveVoice, GeminiOptions, GeminiPreviewVoice, GeminiSTTModel, GeminiSTTOptions, GeminiThinkingLevel, GenerateConvoAITokenOptions, GenerateTokenOptions, GenericAvatarConfig, GenericAvatarOptions, GenericTTSOptions, GenericTts, GenericTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, GoogleSTTOptions, GoogleTTSOptions, GoogleTts, GoogleTtsParams, GradiumTTSOptions, GradiumTts, GradiumTtsParams, GroqOptions, HeyGenAvatarConfig, HeyGenAvatarOptions, HeyGenSampleRate, HumeAITTSOptions, HumeAiTts, HumeAiTtsParams, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LemonSliceOptions, LiveAvatarAvatarConfig, LiveAvatarAvatarOptions, LiveAvatarSampleRate, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmPreset, LlmStyle, LlmTool, LlmToolExecution, LlmToolFunction, LlmToolServer, LlmVendor, McpServer, McpServersItem, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MicrosoftSampleRate, MicrosoftSTTOptions, MicrosoftTTSOptions, MicrosoftTts, MicrosoftTtsParams, MiniMaxCNTTSOptions, MiniMaxTTSOptions, MinimaxTts, MinimaxTtsParams, MistralTTSOptions, MistralTts, MistralTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTTSOptions, MurfTts, MurfTtsParams, OpenAIGPTLiveOptions, OpenAIOptions, OpenAIRealtimeOptions, OpenAISTTOptions, OpenAITTSOptions, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, PresetCategory, PresetInput, PreviewFeature, PreviewRoute, ProtofaceOptions, QwenOmniOptions, RimeTTSOptions, RimeTts, RimeTtsParams, RTZRSTTOptions, RtcConfig, RtzrAsr, RtzrAsrParams, SalConfig, SalMode, SampleRate, SarvamSTTOptions, SarvamTTSOptions, SarvamTts, SarvamTtsParams, SayOptions, SensetimeAvatarConfig, SensetimeAvatarOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SmallestAISTTOptions, SmallestAITTSOptions, SmallestAiAsr, SmallestAiAsrParams, SmallestAiTts, SmallestAiTtsParams, SpatiusAvatarConfig, SpatiusAvatarOptions, SpatiusAvatarParams, SpeakConfig, SpeakPriority, SpeechmaticsSTTOptions, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, StepFunTTSOptions, StrictAvatarConfig, SttConfig, SttVendor, TavusOptions, TencentLLMOptions, TencentSTTOptions, TencentTTSOptions, ThinkOnListeningAction, ThinkOnSpeakingAction, ThinkOnThinkingAction, ThinkOptions, ThinkResponse, TtsConfig, TtsPreset, TtsVendor, TurnDetectionConfig, TurnDetectionLanguage, TurnDetectionNestedConfig, TurnDetectionType, TypecastTTSOptions, TypecastTts, TypecastTtsParams, 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, AzureOpenAIRealtime, BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNMLLM, BaseCNSTT, BaseCNTTS, BaseLLM, BaseMLLM, BaseSTT, BaseTTS, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CartesiaTTS, CosyVoiceTTS, CredentialMode, CustomLLM, createPreviewRoute, DataChannel, DeepgramSTT, DeepgramTTS, DeepSeekLLM, Dify, ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioTTS, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, Gemini, GeminiLive, GeminiLiveModels, GeminiSTT, GeminiSTTModels, GeminiThinkingLevels, GeminiTranscriptionMode, 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, LemonSlice, LiveAvatarAvatar, MAX_EXPIRY_SECONDS, MicrosoftCNSTT, MicrosoftCNTTS, MicrosoftSTT, MicrosoftTTS, MiniMaxCNTTS, MiniMaxTTS, MistralTTS, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, MurfTTS, normalizePresetInput, OpenAI, OpenAIGPTLive, OpenAIRealtime, OpenAISTT, OpenAITTS, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, Protoface, previewRequestHeaders, QwenOmni, REDACTED, RimeTTS, RTZRSTT, redactHeadersForDebug, redactSecrets, SalModeValues, SarvamSTT, SarvamTTS, SarvamTTSLanguage, SensetimeAvatar, SilenceActionValues, SmallestAISTT, SmallestAITTS, SpatiusAvatar, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, SpeechmaticsSTT, StepFunTTS, Tavus, TencentLLM, TencentSTT, TencentTTS, ThinkOnListeningActionIgnore, ThinkOnListeningActionInject, ThinkOnListeningActionInterrupt, ThinkOnSpeakingActionIgnore, ThinkOnSpeakingActionInterrupt, ThinkOnThinkingActionIgnore, ThinkOnThinkingActionInterrupt, TurnDetectionTypeValues, TypecastTTS, 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, AzureOpenAIRealtimeOptions, AzureOpenAIRealtimeParams, BaseMllmOptions, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CartesiaSampleRate, CartesiaTTSOptions, CartesiaTts, CartesiaTtsParams, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, CustomLLMOptions, DeepgramSTTOptions, DeepgramTTSOptions, DeepSeekLLMOptions, DifyOptions, Eagerness, ElevenLabsSampleRate, ElevenLabsTTSOptions, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FengmingSTTOptions, FillerWordsConfig, FillerWordsContent, FillerWordsContentGeneratedConfig, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsGeneratedLlmProvider, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTTSOptions, FishAudioTts, FishAudioTtsParams, GeminiAsrParams, GeminiLiveModel, GeminiLiveOptions, GeminiLiveVoice, GeminiOptions, GeminiPreviewVoice, GeminiSTTModel, GeminiSTTOptions, GeminiThinkingLevel, GenerateClientTokenOptions, GenerateConvoAITokenOptions, GenerateTokenOptions, GenericAvatarConfig, GenericAvatarOptions, GenericTTSOptions, GenericTts, GenericTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, GoogleSTTOptions, GoogleTTSOptions, GoogleTts, GoogleTtsParams, GradiumTTSOptions, GradiumTts, GradiumTtsParams, GroqOptions, HeyGenAvatarConfig, HeyGenAvatarOptions, HeyGenSampleRate, HumeAITTSOptions, HumeAiTts, HumeAiTtsParams, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LemonSliceOptions, LiveAvatarAvatarConfig, LiveAvatarAvatarOptions, LiveAvatarSampleRate, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmPreset, LlmStyle, LlmTool, LlmToolExecution, LlmToolFunction, LlmToolServer, LlmVendor, McpServer, McpServersItem, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MicrosoftSampleRate, MicrosoftSTTOptions, MicrosoftTTSOptions, MicrosoftTts, MicrosoftTtsParams, MiniMaxCNTTSOptions, MiniMaxDuplexTTSOptions, MiniMaxTTSOptions, MinimaxDuplexTts, MinimaxDuplexTtsParams, MinimaxTts, MinimaxTtsParams, MistralTTSOptions, MistralTts, MistralTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTTSOptions, MurfTts, MurfTtsParams, OpenAIGPTLiveOptions, OpenAIOptions, OpenAIRealtimeOptions, OpenAISTTOptions, OpenAITTSOptions, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, PresetCategory, PresetInput, PreviewFeature, PreviewRoute, ProtofaceOptions, QwenOmniOptions, RimeTTSOptions, RimeTts, RimeTtsParams, RTZRSTTOptions, RtcConfig, RtzrAsr, RtzrAsrParams, SalConfig, SalMode, SampleRate, SarvamSTTOptions, SarvamTTSOptions, SarvamTts, SarvamTtsParams, SayOptions, SensetimeAvatarConfig, SensetimeAvatarOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SmallestAISTTOptions, SmallestAITTSOptions, SmallestAiAsr, SmallestAiAsrParams, SmallestAiTts, SmallestAiTtsParams, SonioxTTSOptions, SonioxTts, SonioxTtsParams, SpatiusAvatarConfig, SpatiusAvatarOptions, SpatiusAvatarParams, SpeakConfig, SpeakPriority, SpeechmaticsSTTOptions, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, StepFunSTTOptions, StepFunTTSOptions, StepfunAsr, StepfunAsrParams, StrictAvatarConfig, SttConfig, SttVendor, TavusOptions, TencentLLMOptions, TencentSTTOptions, TencentTTSOptions, ThinkOnListeningAction, ThinkOnSpeakingAction, ThinkOnThinkingAction, ThinkOptions, ThinkResponse, TtsConfig, TtsPreset, TtsVendor, TurnDetectionConfig, TurnDetectionLanguage, TurnDetectionNestedConfig, TurnDetectionType, TypecastTTSOptions, TypecastTts, TypecastTtsParams, 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, AzureOpenAIRealtime, BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNMLLM, BaseCNSTT, BaseCNTTS, BaseLLM, BaseMLLM, BaseSTT, BaseTTS, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CartesiaTTS, CosyVoiceTTS, CredentialMode, CustomLLM, createPreviewRoute, DataChannel, DeepgramSTT, DeepgramTTS, DeepSeekLLM, Dify, ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioTTS, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, Gemini, GeminiLive, GeminiLiveModels, GeminiSTT, GeminiSTTModels, GeminiThinkingLevels, GeminiTranscriptionMode, GenericAvatar, GenericTTS, Geofence, GoogleSTT, GoogleTTS, GradiumTTS, Groq, generateClientToken, generateConvoAIToken, generateRtcToken, HeyGenAvatar, HumeAITTS, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, isSensetimeAvatar, isSpatiusAvatar, LemonSlice, LiveAvatarAvatar, MAX_EXPIRY_SECONDS, MicrosoftCNSTT, MicrosoftCNTTS, MicrosoftSTT, MicrosoftTTS, MiniMaxCNTTS, MiniMaxDuplexTTS, MiniMaxTTS, MistralTTS, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, MurfTTS, normalizePresetInput, OpenAI, OpenAIGPTLive, OpenAIRealtime, OpenAISTT, OpenAITTS, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, Protoface, previewRequestHeaders, QwenOmni, REDACTED, RimeTTS, RTZRSTT, redactHeadersForDebug, redactSecrets, SalModeValues, SarvamSTT, SarvamTTS, SarvamTTSLanguage, SensetimeAvatar, SilenceActionValues, SmallestAISTT, SmallestAITTS, SonioxTTS, SpatiusAvatar, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, SpeechmaticsSTT, StepFunSTT, StepFunTTS, Tavus, TencentLLM, TencentSTT, TencentTTS, ThinkOnListeningActionIgnore, ThinkOnListeningActionInject, ThinkOnListeningActionInterrupt, ThinkOnSpeakingActionIgnore, ThinkOnSpeakingActionInterrupt, ThinkOnThinkingActionIgnore, ThinkOnThinkingActionInterrupt, TurnDetectionTypeValues, TypecastTTS, toBaseAvatarConfig, VertexAI, VertexAILLM, validateAvatarConfig, validateTtsSampleRate, XAiSTT, XAiTTS, XaiGrok, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./agentkit/index.js";
|
|
6
6
|
export type { GeminiTTSConfig, GeminiTTSModel, GeminiTTSOptions } from "./agentkit/vendors/tts.js";
|
|
7
7
|
export { GeminiTTS, GeminiTTSModels } from "./agentkit/vendors/tts.js";
|
|
8
8
|
export * as Agora from "./api/index.js";
|
package/dist/cjs/index.js
CHANGED
|
@@ -37,9 +37,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.GeminiLiveModels = exports.GeminiLive = exports.Gemini = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.FishAudioTTS = exports.FillerWordsSelectionRule = exports.FengmingSTT = exports.ExpiresIn = exports.ElevenLabsTTS = exports.Dify = exports.DeepSeekLLM = exports.DeepgramTTS = exports.DeepgramSTT = exports.DataChannel = exports.createPreviewRoute = 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.BaseCNMLLM = exports.BaseCNLLM = exports.BaseCNAvatar = exports.BaseAvatar = exports.AzureOpenAIRealtime = 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.
|
|
41
|
-
exports.
|
|
42
|
-
exports.AgoraTimeoutError = exports.AgoraError = exports.AgoraEnvironment = exports.Area = exports.Agora = exports.GeminiTTSModels = exports.GeminiTTS = void 0;
|
|
40
|
+
exports.OpenAIRealtime = exports.OpenAIGPTLive = exports.OpenAI = exports.normalizePresetInput = exports.MurfTTS = exports.MllmTurnDetectionModeValues = exports.MllmTurnDetectionModeServerVad = exports.MllmTurnDetectionModeSemanticVad = exports.MllmTurnDetectionModeAgoraVad = exports.MistralTTS = exports.MiniMaxTTS = exports.MiniMaxDuplexTTS = exports.MiniMaxCNTTS = exports.MicrosoftTTS = exports.MicrosoftSTT = exports.MicrosoftCNTTS = exports.MicrosoftCNSTT = exports.MAX_EXPIRY_SECONDS = exports.LiveAvatarAvatar = exports.LemonSlice = 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 = exports.generateClientToken = exports.Groq = exports.GradiumTTS = exports.GoogleTTS = exports.GoogleSTT = exports.Geofence = exports.GenericTTS = exports.GenericAvatar = exports.GeminiTranscriptionMode = exports.GeminiThinkingLevels = exports.GeminiSTTModels = exports.GeminiSTT = void 0;
|
|
41
|
+
exports.XAiTTS = exports.XAiSTT = exports.validateTtsSampleRate = exports.validateAvatarConfig = exports.VertexAILLM = exports.VertexAI = exports.toBaseAvatarConfig = exports.TypecastTTS = exports.TurnDetectionTypeValues = exports.ThinkOnThinkingActionInterrupt = exports.ThinkOnThinkingActionIgnore = exports.ThinkOnSpeakingActionInterrupt = exports.ThinkOnSpeakingActionIgnore = exports.ThinkOnListeningActionInterrupt = exports.ThinkOnListeningActionInject = exports.ThinkOnListeningActionIgnore = exports.TencentTTS = exports.TencentSTT = exports.TencentLLM = exports.Tavus = exports.StepFunTTS = exports.StepFunSTT = exports.SpeechmaticsSTT = exports.SpeakPriorityValues = exports.SpeakPriorityInterrupt = exports.SpeakPriorityIgnore = exports.SpeakPriorityAppend = exports.SpatiusAvatar = exports.SonioxTTS = exports.SmallestAITTS = exports.SmallestAISTT = exports.SilenceActionValues = exports.SensetimeAvatar = exports.SarvamTTSLanguage = exports.SarvamTTS = exports.SarvamSTT = exports.SalModeValues = exports.redactSecrets = exports.redactHeadersForDebug = exports.RTZRSTT = exports.RimeTTS = exports.REDACTED = exports.QwenOmni = exports.previewRequestHeaders = exports.Protoface = exports.PreviewFeatures = exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.OpenAITTS = exports.OpenAISTT = void 0;
|
|
42
|
+
exports.AgoraTimeoutError = exports.AgoraError = exports.AgoraEnvironment = exports.Area = exports.Agora = exports.GeminiTTSModels = exports.GeminiTTS = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.XaiGrok = void 0;
|
|
43
43
|
var AgoraPoolClient_js_1 = require("./AgoraPoolClient.js");
|
|
44
44
|
Object.defineProperty(exports, "AgoraClient", { enumerable: true, get: function () { return AgoraPoolClient_js_1.AgoraClient; } });
|
|
45
45
|
// Agentkit layer exports - clean, ergonomic API
|
|
@@ -106,6 +106,7 @@ Object.defineProperty(exports, "GoogleSTT", { enumerable: true, get: function ()
|
|
|
106
106
|
Object.defineProperty(exports, "GoogleTTS", { enumerable: true, get: function () { return index_js_1.GoogleTTS; } });
|
|
107
107
|
Object.defineProperty(exports, "GradiumTTS", { enumerable: true, get: function () { return index_js_1.GradiumTTS; } });
|
|
108
108
|
Object.defineProperty(exports, "Groq", { enumerable: true, get: function () { return index_js_1.Groq; } });
|
|
109
|
+
Object.defineProperty(exports, "generateClientToken", { enumerable: true, get: function () { return index_js_1.generateClientToken; } });
|
|
109
110
|
Object.defineProperty(exports, "generateConvoAIToken", { enumerable: true, get: function () { return index_js_1.generateConvoAIToken; } });
|
|
110
111
|
Object.defineProperty(exports, "generateRtcToken", { enumerable: true, get: function () { return index_js_1.generateRtcToken; } });
|
|
111
112
|
// Avatar vendors
|
|
@@ -133,6 +134,7 @@ Object.defineProperty(exports, "MicrosoftCNTTS", { enumerable: true, get: functi
|
|
|
133
134
|
Object.defineProperty(exports, "MicrosoftSTT", { enumerable: true, get: function () { return index_js_1.MicrosoftSTT; } });
|
|
134
135
|
Object.defineProperty(exports, "MicrosoftTTS", { enumerable: true, get: function () { return index_js_1.MicrosoftTTS; } });
|
|
135
136
|
Object.defineProperty(exports, "MiniMaxCNTTS", { enumerable: true, get: function () { return index_js_1.MiniMaxCNTTS; } });
|
|
137
|
+
Object.defineProperty(exports, "MiniMaxDuplexTTS", { enumerable: true, get: function () { return index_js_1.MiniMaxDuplexTTS; } });
|
|
136
138
|
Object.defineProperty(exports, "MiniMaxTTS", { enumerable: true, get: function () { return index_js_1.MiniMaxTTS; } });
|
|
137
139
|
Object.defineProperty(exports, "MistralTTS", { enumerable: true, get: function () { return index_js_1.MistralTTS; } });
|
|
138
140
|
Object.defineProperty(exports, "MllmTurnDetectionModeAgoraVad", { enumerable: true, get: function () { return index_js_1.MllmTurnDetectionModeAgoraVad; } });
|
|
@@ -167,6 +169,7 @@ Object.defineProperty(exports, "SensetimeAvatar", { enumerable: true, get: funct
|
|
|
167
169
|
Object.defineProperty(exports, "SilenceActionValues", { enumerable: true, get: function () { return index_js_1.SilenceActionValues; } });
|
|
168
170
|
Object.defineProperty(exports, "SmallestAISTT", { enumerable: true, get: function () { return index_js_1.SmallestAISTT; } });
|
|
169
171
|
Object.defineProperty(exports, "SmallestAITTS", { enumerable: true, get: function () { return index_js_1.SmallestAITTS; } });
|
|
172
|
+
Object.defineProperty(exports, "SonioxTTS", { enumerable: true, get: function () { return index_js_1.SonioxTTS; } });
|
|
170
173
|
Object.defineProperty(exports, "SpatiusAvatar", { enumerable: true, get: function () { return index_js_1.SpatiusAvatar; } });
|
|
171
174
|
Object.defineProperty(exports, "SpeakPriorityAppend", { enumerable: true, get: function () { return index_js_1.SpeakPriorityAppend; } });
|
|
172
175
|
Object.defineProperty(exports, "SpeakPriorityIgnore", { enumerable: true, get: function () { return index_js_1.SpeakPriorityIgnore; } });
|
|
@@ -174,6 +177,7 @@ Object.defineProperty(exports, "SpeakPriorityInterrupt", { enumerable: true, get
|
|
|
174
177
|
Object.defineProperty(exports, "SpeakPriorityValues", { enumerable: true, get: function () { return index_js_1.SpeakPriorityValues; } });
|
|
175
178
|
// STT vendors
|
|
176
179
|
Object.defineProperty(exports, "SpeechmaticsSTT", { enumerable: true, get: function () { return index_js_1.SpeechmaticsSTT; } });
|
|
180
|
+
Object.defineProperty(exports, "StepFunSTT", { enumerable: true, get: function () { return index_js_1.StepFunSTT; } });
|
|
177
181
|
Object.defineProperty(exports, "StepFunTTS", { enumerable: true, get: function () { return index_js_1.StepFunTTS; } });
|
|
178
182
|
Object.defineProperty(exports, "Tavus", { enumerable: true, get: function () { return index_js_1.Tavus; } });
|
|
179
183
|
Object.defineProperty(exports, "TencentLLM", { enumerable: true, get: function () { return index_js_1.TencentLLM; } });
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "v2.
|
|
1
|
+
export declare const SDK_VERSION = "v2.14.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.14.0",
|
|
9
|
+
"User-Agent": "agora-agents/v2.14.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);
|
|
@@ -230,6 +230,7 @@ export class AgentSession {
|
|
|
230
230
|
* @throws {Error} If configuration is invalid
|
|
231
231
|
*/
|
|
232
232
|
_validateAvatarConfig() {
|
|
233
|
+
var _a;
|
|
233
234
|
const agentConfig = this._agent.config;
|
|
234
235
|
const avatar = agentConfig.avatar;
|
|
235
236
|
const tts = this._agent.tts;
|
|
@@ -261,11 +262,13 @@ export class AgentSession {
|
|
|
261
262
|
// Note: tts can be a string (shorthand) or an object with params
|
|
262
263
|
// Sample-rate fields vary by provider, so check the generated wire names dynamically.
|
|
263
264
|
const ttsParams = tts && typeof tts !== "string" ? tts.params : undefined;
|
|
264
|
-
const sampleRate =
|
|
265
|
-
?
|
|
266
|
-
: ttsParams && "
|
|
267
|
-
? ttsParams.
|
|
268
|
-
:
|
|
265
|
+
const sampleRate = tts && typeof tts !== "string" && tts.vendor === "minimax_duplex"
|
|
266
|
+
? (_a = tts.params.audio_setting) === null || _a === void 0 ? void 0 : _a.sample_rate
|
|
267
|
+
: ttsParams && "sample_rate" in ttsParams
|
|
268
|
+
? ttsParams.sample_rate
|
|
269
|
+
: ttsParams && "speech_sample_rate" in ttsParams
|
|
270
|
+
? ttsParams.speech_sample_rate
|
|
271
|
+
: undefined;
|
|
269
272
|
if (typeof sampleRate === "number") {
|
|
270
273
|
if (isHeyGenAvatar(strictAvatar) || isLiveAvatarAvatar(strictAvatar) || isAkoolAvatar(strictAvatar)) {
|
|
271
274
|
validateTtsSampleRate(strictAvatar, sampleRate);
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* 3. **Convenience methods** (say, stop, interrupt, etc.) are the only
|
|
19
19
|
* parts that need manual updates when adding new sugar.
|
|
20
20
|
*/
|
|
21
|
+
export type { MinimaxDuplexTts, MinimaxDuplexTtsParams, SonioxTts, SonioxTtsParams, StepfunAsr, StepfunAsrParams, } from "../api/index.mjs";
|
|
21
22
|
export type { AgentsClient } from "../api/resources/agents/client/Client.mjs";
|
|
22
23
|
export type { AgentOptions } from "./Agent.mjs";
|
|
23
24
|
export { Agent } from "./Agent.mjs";
|
|
@@ -32,20 +33,20 @@ export { AgentPresets, normalizePresetInput } from "./presets.mjs";
|
|
|
32
33
|
export type { PreviewFeature, PreviewRoute } from "./preview/client.mjs";
|
|
33
34
|
export { createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./preview/client.mjs";
|
|
34
35
|
export type { AvatarVendor, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, LlmVendor, SttVendor, TtsVendor, } from "./region-vendors.mjs";
|
|
35
|
-
export type { GenerateConvoAITokenOptions, GenerateTokenOptions, } from "./token.mjs";
|
|
36
|
-
export { ExpiresIn, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.mjs";
|
|
36
|
+
export type { GenerateClientTokenOptions, GenerateConvoAITokenOptions, GenerateTokenOptions, } from "./token.mjs";
|
|
37
|
+
export { ExpiresIn, generateClientToken, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.mjs";
|
|
37
38
|
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, FillerWordsContentGeneratedConfig, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsGeneratedLlmProvider, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTts, FishAudioTtsParams, GeminiAsrParams, GenericTts, GenericTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GoogleTts, GoogleTtsParams, GradiumTts, GradiumTtsParams, HumeAiTts, HumeAiTtsParams, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmStyle, LlmTool, LlmToolExecution, LlmToolFunction, LlmToolServer, McpServer, McpServersItem, MicrosoftTts, MicrosoftTtsParams, MinimaxTts, MinimaxTtsParams, MistralTts, MistralTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTts, MurfTtsParams, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, RimeTts, RimeTtsParams, RtcConfig, RtzrAsr, RtzrAsrParams, SalConfig, SalMode, SarvamTts, SarvamTtsParams, SayOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SmallestAiAsr, SmallestAiAsrParams, SmallestAiTts, SmallestAiTtsParams, SpatiusAvatarParams, SpeakConfig, SpeakPriority, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, SttConfig, ThinkOnListeningAction, ThinkOnSpeakingAction, ThinkOnThinkingAction, ThinkOptions, ThinkResponse, TtsConfig, TurnDetectionConfig, TurnDetectionLanguage, TurnDetectionNestedConfig, TurnDetectionType, TypecastTts, TypecastTtsParams, XAiAsr, XAiAsrParams, XAiTts, XAiTtsParams, } from "./types.mjs";
|
|
38
39
|
export type { AkoolAvatarOptions, AnamAvatarOptions, GenericAvatarOptions, HeyGenAvatarOptions, LemonSliceOptions, LiveAvatarAvatarOptions, ProtofaceOptions, TavusOptions, } from "./vendors/avatar.mjs";
|
|
39
40
|
export { AkoolAvatar, AnamAvatar, GenericAvatar, HeyGenAvatar, LemonSlice, LiveAvatarAvatar, Protoface, Tavus, } from "./vendors/avatar.mjs";
|
|
40
41
|
export type { AkoolSampleRate, CartesiaSampleRate, ElevenLabsSampleRate, HeyGenSampleRate, LiveAvatarSampleRate, MicrosoftSampleRate, SampleRate, } from "./vendors/base.mjs";
|
|
41
42
|
export { BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNMLLM, BaseCNSTT, BaseCNTTS, BaseLLM, type BaseLlmOptions, BaseMLLM, type BaseMllmOptions, BaseSTT, BaseTTS, type GoogleTTSSampleRate, } from "./vendors/base.mjs";
|
|
42
|
-
export type { AliyunLLMOptions, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CosyVoiceTTSOptions, DeepSeekLLMOptions, FengmingSTTOptions, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MiniMaxCNTTSOptions, SensetimeAvatarOptions, SpatiusAvatarOptions, StepFunTTSOptions, TencentLLMOptions, TencentSTTOptions, TencentTTSOptions, XfyunBigModelSTTOptions, XfyunDialectSTTOptions, XfyunSTTOptions, } from "./vendors/cn.mjs";
|
|
43
|
-
export { AliyunLLM, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CosyVoiceTTS, DeepSeekLLM, FengmingSTT, MicrosoftCNSTT, MicrosoftCNTTS, MiniMaxCNTTS, SensetimeAvatar, SpatiusAvatar, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./vendors/cn.mjs";
|
|
43
|
+
export type { AliyunLLMOptions, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CosyVoiceTTSOptions, DeepSeekLLMOptions, FengmingSTTOptions, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MiniMaxCNTTSOptions, MiniMaxDuplexTTSOptions, SensetimeAvatarOptions, SpatiusAvatarOptions, StepFunSTTOptions, StepFunTTSOptions, TencentLLMOptions, TencentSTTOptions, TencentTTSOptions, XfyunBigModelSTTOptions, XfyunDialectSTTOptions, XfyunSTTOptions, } from "./vendors/cn.mjs";
|
|
44
|
+
export { AliyunLLM, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CosyVoiceTTS, DeepSeekLLM, FengmingSTT, MicrosoftCNSTT, MicrosoftCNTTS, MiniMaxCNTTS, MiniMaxDuplexTTS, SensetimeAvatar, SpatiusAvatar, StepFunSTT, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./vendors/cn.mjs";
|
|
44
45
|
export type { AmazonBedrockOptions, AnthropicOptions, AzureOpenAIOptions, CustomLLMOptions, DifyOptions, GeminiOptions, GroqOptions, OpenAIOptions, VertexAILLMOptions, } from "./vendors/llm.mjs";
|
|
45
46
|
export { AmazonBedrock, Anthropic, AzureOpenAI, CustomLLM, Dify, Gemini, Groq, OpenAI, VertexAILLM, } from "./vendors/llm.mjs";
|
|
46
47
|
export type { AzureOpenAIRealtimeOptions, AzureOpenAIRealtimeParams, GeminiLiveModel, GeminiLiveOptions, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, OpenAIGPTLiveOptions, OpenAIRealtimeOptions, QwenOmniOptions, VertexAIOptions, XaiGrokOptions, } from "./vendors/mllm.mjs";
|
|
47
48
|
export { AzureOpenAIRealtime, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLive, GeminiLiveModels, GeminiThinkingLevels, OpenAIGPTLive, OpenAIRealtime, QwenOmni, VertexAI, XaiGrok, } from "./vendors/mllm.mjs";
|
|
48
49
|
export type { AmazonSTTOptions, AresSTTOptions, AssemblyAISTTOptions, DeepgramSTTOptions, GeminiSTTModel, GeminiSTTOptions, GoogleSTTOptions, MicrosoftSTTOptions, OpenAISTTOptions, RTZRSTTOptions, SarvamSTTOptions, SmallestAISTTOptions, SpeechmaticsSTTOptions, XAiSTTOptions, } from "./vendors/stt.mjs";
|
|
49
50
|
export { AmazonSTT, AresSTT, AssemblyAISTT, DeepgramSTT, GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode, GoogleSTT, MicrosoftSTT, OpenAISTT, RTZRSTT, SarvamSTT, SmallestAISTT, SpeechmaticsSTT, XAiSTT, } from "./vendors/stt.mjs";
|
|
50
|
-
export type { AmazonTTSOptions, CartesiaTTSOptions, DeepgramTTSOptions, ElevenLabsTTSOptions, FishAudioTTSOptions, GeminiTTSConfig, GeminiTTSModel, GeminiTTSOptions, GenericTTSOptions, GoogleTTSOptions, GradiumTTSOptions, HumeAITTSOptions, MicrosoftTTSOptions, MiniMaxTTSOptions, MistralTTSOptions, MurfTTSOptions, OpenAITTSOptions, RimeTTSOptions, SarvamTTSOptions, SmallestAITTSOptions, TypecastTTSOptions, XAiTTSOptions, } from "./vendors/tts.mjs";
|
|
51
|
-
export { AmazonTTS, CartesiaTTS, DeepgramTTS, ElevenLabsTTS, FishAudioTTS, GeminiTTS, GeminiTTSModels, GenericTTS, GoogleTTS, GradiumTTS, HumeAITTS, MicrosoftTTS, MiniMaxTTS, MistralTTS, MurfTTS, OpenAITTS, RimeTTS, SarvamTTS, SarvamTTSLanguage, SmallestAITTS, TypecastTTS, XAiTTS, } from "./vendors/tts.mjs";
|
|
51
|
+
export type { AmazonTTSOptions, CartesiaTTSOptions, DeepgramTTSOptions, ElevenLabsTTSOptions, FishAudioTTSOptions, GeminiTTSConfig, GeminiTTSModel, GeminiTTSOptions, GenericTTSOptions, GoogleTTSOptions, GradiumTTSOptions, HumeAITTSOptions, MicrosoftTTSOptions, MiniMaxTTSOptions, MistralTTSOptions, MurfTTSOptions, OpenAITTSOptions, RimeTTSOptions, SarvamTTSOptions, SmallestAITTSOptions, SonioxTTSOptions, TypecastTTSOptions, XAiTTSOptions, } from "./vendors/tts.mjs";
|
|
52
|
+
export { AmazonTTS, CartesiaTTS, DeepgramTTS, ElevenLabsTTS, FishAudioTTS, GeminiTTS, GeminiTTSModels, GenericTTS, GoogleTTS, GradiumTTS, HumeAITTS, MicrosoftTTS, MiniMaxTTS, MistralTTS, MurfTTS, OpenAITTS, RimeTTS, SarvamTTS, SarvamTTSLanguage, SmallestAITTS, SonioxTTS, TypecastTTS, XAiTTS, } from "./vendors/tts.mjs";
|
|
@@ -28,12 +28,12 @@ export { REDACTED, redactHeadersForDebug, redactSecrets } from "./debug.mjs";
|
|
|
28
28
|
export { AgentPresets, normalizePresetInput } from "./presets.mjs";
|
|
29
29
|
export { createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./preview/client.mjs";
|
|
30
30
|
// Token generation
|
|
31
|
-
export { ExpiresIn, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.mjs";
|
|
31
|
+
export { ExpiresIn, generateClientToken, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.mjs";
|
|
32
32
|
// Avatar vendor classes
|
|
33
33
|
export { AkoolAvatar, AnamAvatar, GenericAvatar, HeyGenAvatar, LemonSlice, LiveAvatarAvatar, Protoface, Tavus, } from "./vendors/avatar.mjs";
|
|
34
34
|
// Base vendor classes
|
|
35
35
|
export { BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNMLLM, BaseCNSTT, BaseCNTTS, BaseLLM, BaseMLLM, BaseSTT, BaseTTS, } from "./vendors/base.mjs";
|
|
36
|
-
export { AliyunLLM, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CosyVoiceTTS, DeepSeekLLM, FengmingSTT, MicrosoftCNSTT, MicrosoftCNTTS, MiniMaxCNTTS, SensetimeAvatar, SpatiusAvatar, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./vendors/cn.mjs";
|
|
36
|
+
export { AliyunLLM, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CosyVoiceTTS, DeepSeekLLM, FengmingSTT, MicrosoftCNSTT, MicrosoftCNTTS, MiniMaxCNTTS, MiniMaxDuplexTTS, SensetimeAvatar, SpatiusAvatar, StepFunSTT, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./vendors/cn.mjs";
|
|
37
37
|
// LLM vendor classes
|
|
38
38
|
export { AmazonBedrock, Anthropic, AzureOpenAI, CustomLLM, Dify, Gemini, Groq, OpenAI, VertexAILLM, } from "./vendors/llm.mjs";
|
|
39
39
|
// MLLM vendor classes
|
|
@@ -41,4 +41,4 @@ export { AzureOpenAIRealtime, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI
|
|
|
41
41
|
// STT vendor classes
|
|
42
42
|
export { AmazonSTT, AresSTT, AssemblyAISTT, DeepgramSTT, GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode, GoogleSTT, MicrosoftSTT, OpenAISTT, RTZRSTT, SarvamSTT, SmallestAISTT, SpeechmaticsSTT, XAiSTT, } from "./vendors/stt.mjs";
|
|
43
43
|
// TTS vendor classes
|
|
44
|
-
export { AmazonTTS, CartesiaTTS, DeepgramTTS, ElevenLabsTTS, FishAudioTTS, GeminiTTS, GeminiTTSModels, GenericTTS, GoogleTTS, GradiumTTS, HumeAITTS, MicrosoftTTS, MiniMaxTTS, MistralTTS, MurfTTS, OpenAITTS, RimeTTS, SarvamTTS, SarvamTTSLanguage, SmallestAITTS, TypecastTTS, XAiTTS, } from "./vendors/tts.mjs";
|
|
44
|
+
export { AmazonTTS, CartesiaTTS, DeepgramTTS, ElevenLabsTTS, FishAudioTTS, GeminiTTS, GeminiTTSModels, GenericTTS, GoogleTTS, GradiumTTS, HumeAITTS, MicrosoftTTS, MiniMaxTTS, MistralTTS, MurfTTS, OpenAITTS, RimeTTS, SarvamTTS, SarvamTTSLanguage, SmallestAITTS, SonioxTTS, TypecastTTS, XAiTTS, } from "./vendors/tts.mjs";
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
* - RTC tokens authenticate a specific (appId, channel, uid) combination with
|
|
5
5
|
* the Agora RTC network.
|
|
6
6
|
* - ConvoAI tokens are RTC + RTM + ConvoAI tokens used to authenticate
|
|
7
|
-
* ConvoAI REST API calls via `Authorization: agora token=<token>`.
|
|
7
|
+
* ConvoAI REST API calls via `Authorization: agora token=<token>`. Keep them
|
|
8
|
+
* on the server.
|
|
9
|
+
* - Client tokens are RTC + RTM only, for front-end token routes. They join a
|
|
10
|
+
* channel and log in to RTM but cannot call the ConvoAI REST API.
|
|
8
11
|
*
|
|
9
12
|
* The `agora-token` library handles the JWT signing.
|
|
10
13
|
*/
|
|
@@ -74,8 +77,12 @@ export interface GenerateConvoAITokenOptions {
|
|
|
74
77
|
appCertificate: string;
|
|
75
78
|
/** The channel the agent will join — must match the channel used in the start request */
|
|
76
79
|
channelName: string;
|
|
77
|
-
/**
|
|
78
|
-
|
|
80
|
+
/**
|
|
81
|
+
* ConvoAI participant UID: a numeric RTC UID or a string user account. Use the
|
|
82
|
+
* RTC UID for a user, agent, or avatar. Both forms are signed as the UID's
|
|
83
|
+
* string form, which is also the RTM user ID.
|
|
84
|
+
*/
|
|
85
|
+
uid: number | string;
|
|
79
86
|
/** Seconds until the token expires (default: 86400) */
|
|
80
87
|
tokenExpire?: number;
|
|
81
88
|
/**
|
|
@@ -95,3 +102,31 @@ export interface GenerateConvoAITokenOptions {
|
|
|
95
102
|
* privileges in a single AccessToken2 token.
|
|
96
103
|
*/
|
|
97
104
|
export declare function generateConvoAIToken(opts: GenerateConvoAITokenOptions): string;
|
|
105
|
+
export interface GenerateClientTokenOptions {
|
|
106
|
+
appId: string;
|
|
107
|
+
appCertificate: string;
|
|
108
|
+
/** The channel the client will join. */
|
|
109
|
+
channelName: string;
|
|
110
|
+
/**
|
|
111
|
+
* The client's RTC UID or string user account. It is also the RTM user ID, so
|
|
112
|
+
* it must be nonzero and nonempty.
|
|
113
|
+
*/
|
|
114
|
+
uid: number | string;
|
|
115
|
+
/** Seconds until the token expires (default: 86400) */
|
|
116
|
+
tokenExpire?: number;
|
|
117
|
+
/**
|
|
118
|
+
* Seconds until RTC privileges expire. Defaults to `tokenExpire`. RTM login
|
|
119
|
+
* keeps the token lifetime.
|
|
120
|
+
*/
|
|
121
|
+
privilegeExpire?: number;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Builds an RTC + RTM token for a front-end client. Use it in token routes that
|
|
125
|
+
* hand tokens to browsers or apps.
|
|
126
|
+
*
|
|
127
|
+
* The token joins the RTC channel as a publisher and logs in to RTM, the data
|
|
128
|
+
* channel for agent transcripts and state. It carries no ConvoAI service, so it
|
|
129
|
+
* cannot authenticate ConvoAI REST calls. Use {@link generateConvoAIToken} for
|
|
130
|
+
* server-side REST authentication and agent tokens instead.
|
|
131
|
+
*/
|
|
132
|
+
export declare function generateClientToken(opts: GenerateClientTokenOptions): string;
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
* - RTC tokens authenticate a specific (appId, channel, uid) combination with
|
|
5
5
|
* the Agora RTC network.
|
|
6
6
|
* - ConvoAI tokens are RTC + RTM + ConvoAI tokens used to authenticate
|
|
7
|
-
* ConvoAI REST API calls via `Authorization: agora token=<token>`.
|
|
7
|
+
* ConvoAI REST API calls via `Authorization: agora token=<token>`. Keep them
|
|
8
|
+
* on the server.
|
|
9
|
+
* - Client tokens are RTC + RTM only, for front-end token routes. They join a
|
|
10
|
+
* channel and log in to RTM but cannot call the ConvoAI REST API.
|
|
8
11
|
*
|
|
9
12
|
* The `agora-token` library handles the JWT signing.
|
|
10
13
|
*/
|
|
@@ -147,8 +150,31 @@ export function generateConvoAIToken(opts) {
|
|
|
147
150
|
return _requireBuiltToken(agoraToken.ConvoAITokenBuilder.buildToken(opts.appId, opts.appCertificate, opts.channelName, account, agoraToken.RtcRole.PUBLISHER, tokenExpire, privilegeExpire, privilegeExpire, privilegeExpire, privilegeExpire, account, privilegeExpire), opts.appId, opts.appCertificate);
|
|
148
151
|
}
|
|
149
152
|
function _uidToAccount(uid) {
|
|
153
|
+
if (typeof uid === "string") {
|
|
154
|
+
return uid;
|
|
155
|
+
}
|
|
150
156
|
if (!Number.isInteger(uid)) {
|
|
151
157
|
throw new Error("uid must be an integer when provided as a number");
|
|
152
158
|
}
|
|
153
159
|
return String(uid);
|
|
154
160
|
}
|
|
161
|
+
/**
|
|
162
|
+
* Builds an RTC + RTM token for a front-end client. Use it in token routes that
|
|
163
|
+
* hand tokens to browsers or apps.
|
|
164
|
+
*
|
|
165
|
+
* The token joins the RTC channel as a publisher and logs in to RTM, the data
|
|
166
|
+
* channel for agent transcripts and state. It carries no ConvoAI service, so it
|
|
167
|
+
* cannot authenticate ConvoAI REST calls. Use {@link generateConvoAIToken} for
|
|
168
|
+
* server-side REST authentication and agent tokens instead.
|
|
169
|
+
*/
|
|
170
|
+
export function generateClientToken(opts) {
|
|
171
|
+
var _a;
|
|
172
|
+
const account = _uidToAccount(opts.uid);
|
|
173
|
+
if (account === "" || /^0+$/.test(account)) {
|
|
174
|
+
throw new Error("uid must be nonzero and nonempty: it is also the RTM user ID");
|
|
175
|
+
}
|
|
176
|
+
const tokenExpire = (_a = opts.tokenExpire) !== null && _a !== void 0 ? _a : DEFAULT_EXPIRY_SECONDS;
|
|
177
|
+
// Per Agora docs, privilegeExpire=0 means "expires immediately", which is invalid.
|
|
178
|
+
const privilegeExpire = opts.privilegeExpire || tokenExpire;
|
|
179
|
+
return _requireBuiltToken(agoraToken.RtcTokenBuilder.buildTokenWithRtm(opts.appId, opts.appCertificate, opts.channelName, account, agoraToken.RtcRole.PUBLISHER, tokenExpire, privilegeExpire), opts.appId, opts.appCertificate);
|
|
180
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MinimaxDuplexTtsParams } from "../../api/index.mjs";
|
|
1
2
|
import type { AvatarConfig, LlmConfig, SttConfig, TtsConfig } from "../types.mjs";
|
|
2
3
|
import { BaseCNAvatar, BaseCNLLM, BaseCNSTT, BaseCNTTS, type BaseLlmOptions } from "./base.mjs";
|
|
3
4
|
export interface FengmingSTTOptions {
|
|
@@ -11,6 +12,16 @@ export declare class FengmingSTT extends BaseCNSTT {
|
|
|
11
12
|
constructor(options?: FengmingSTTOptions);
|
|
12
13
|
toConfig(): SttConfig;
|
|
13
14
|
}
|
|
15
|
+
export interface StepFunSTTOptions {
|
|
16
|
+
apiKey: string;
|
|
17
|
+
additionalParams?: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
/** StepFun ASR for mainland China. */
|
|
20
|
+
export declare class StepFunSTT extends BaseCNSTT {
|
|
21
|
+
private readonly options;
|
|
22
|
+
constructor(options: StepFunSTTOptions);
|
|
23
|
+
toConfig(): SttConfig;
|
|
24
|
+
}
|
|
14
25
|
export interface MicrosoftCNSTTOptions {
|
|
15
26
|
key: string;
|
|
16
27
|
region: string;
|
|
@@ -74,6 +85,29 @@ export declare class XfyunDialectSTT extends BaseCNSTT {
|
|
|
74
85
|
constructor(options: XfyunDialectSTTOptions);
|
|
75
86
|
toConfig(): SttConfig;
|
|
76
87
|
}
|
|
88
|
+
export interface MiniMaxDuplexTTSOptions {
|
|
89
|
+
key: string;
|
|
90
|
+
model: string;
|
|
91
|
+
url?: string;
|
|
92
|
+
voiceSetting: MinimaxDuplexTtsParams.VoiceSetting;
|
|
93
|
+
audioSetting?: MinimaxDuplexTtsParams.AudioSetting;
|
|
94
|
+
pronunciationDict?: MinimaxDuplexTtsParams.PronunciationDict;
|
|
95
|
+
voiceModify?: MinimaxDuplexTtsParams.VoiceModify;
|
|
96
|
+
languageBoost?: string;
|
|
97
|
+
textNormalizationMode?: string;
|
|
98
|
+
subtitleEnable?: boolean;
|
|
99
|
+
subtitleType?: string;
|
|
100
|
+
continuousSound?: boolean;
|
|
101
|
+
sessionId?: string;
|
|
102
|
+
skipPatterns?: number[];
|
|
103
|
+
additionalParams?: Record<string, unknown>;
|
|
104
|
+
}
|
|
105
|
+
/** MiniMax duplex streaming TTS. Currently available only in mainland China. */
|
|
106
|
+
export declare class MiniMaxDuplexTTS extends BaseCNTTS {
|
|
107
|
+
private readonly options;
|
|
108
|
+
constructor(options: MiniMaxDuplexTTSOptions);
|
|
109
|
+
toConfig(): TtsConfig;
|
|
110
|
+
}
|
|
77
111
|
export interface MiniMaxCNVoiceSetting {
|
|
78
112
|
voice_id: string;
|
|
79
113
|
speed?: number;
|
|
@@ -19,6 +19,20 @@ export class FengmingSTT extends BaseCNSTT {
|
|
|
19
19
|
return Object.assign(Object.assign({ vendor: "fengming" }, (keywords !== undefined && { keywords })), (hasParams && { params: Object.assign({}, additionalParams) }));
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
/** StepFun ASR for mainland China. */
|
|
23
|
+
export class StepFunSTT extends BaseCNSTT {
|
|
24
|
+
constructor(options) {
|
|
25
|
+
super();
|
|
26
|
+
this.options = options;
|
|
27
|
+
requireString(options.apiKey, "apiKey", "StepFunSTT");
|
|
28
|
+
}
|
|
29
|
+
toConfig() {
|
|
30
|
+
return {
|
|
31
|
+
vendor: "stepfun",
|
|
32
|
+
params: Object.assign(Object.assign({}, this.options.additionalParams), { api_key: this.options.apiKey }),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
22
36
|
export class MicrosoftCNSTT extends BaseCNSTT {
|
|
23
37
|
constructor(options) {
|
|
24
38
|
super();
|
|
@@ -107,6 +121,22 @@ export class XfyunDialectSTT extends BaseCNSTT {
|
|
|
107
121
|
};
|
|
108
122
|
}
|
|
109
123
|
}
|
|
124
|
+
/** MiniMax duplex streaming TTS. Currently available only in mainland China. */
|
|
125
|
+
export class MiniMaxDuplexTTS extends BaseCNTTS {
|
|
126
|
+
constructor(options) {
|
|
127
|
+
var _a;
|
|
128
|
+
super();
|
|
129
|
+
this.options = options;
|
|
130
|
+
requireString(options.key, "key", "MiniMaxDuplexTTS");
|
|
131
|
+
requireString(options.model, "model", "MiniMaxDuplexTTS");
|
|
132
|
+
requireString((_a = options.voiceSetting) === null || _a === void 0 ? void 0 : _a.voice_id, "voiceSetting.voice_id", "MiniMaxDuplexTTS");
|
|
133
|
+
}
|
|
134
|
+
toConfig() {
|
|
135
|
+
const { key, model, url, voiceSetting, audioSetting, pronunciationDict, voiceModify, languageBoost, textNormalizationMode, subtitleEnable, subtitleType, continuousSound, sessionId, skipPatterns, additionalParams, } = this.options;
|
|
136
|
+
return Object.assign({ vendor: "minimax_duplex", params: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, additionalParams), { key,
|
|
137
|
+
model, voice_setting: voiceSetting }), (url !== undefined && { url })), (audioSetting !== undefined && { audio_setting: audioSetting })), (pronunciationDict !== undefined && { pronunciation_dict: pronunciationDict })), (voiceModify !== undefined && { voice_modify: voiceModify })), (languageBoost !== undefined && { language_boost: languageBoost })), (textNormalizationMode !== undefined && { text_normalization_mode: textNormalizationMode })), (subtitleEnable !== undefined && { subtitle_enable: subtitleEnable })), (subtitleType !== undefined && { subtitle_type: subtitleType })), (continuousSound !== undefined && { continuous_sound: continuousSound })), (sessionId !== undefined && { session_id: sessionId })) }, (skipPatterns !== undefined && { skip_patterns: skipPatterns }));
|
|
138
|
+
}
|
|
139
|
+
}
|
|
110
140
|
export class MiniMaxCNTTS extends BaseCNTTS {
|
|
111
141
|
constructor(options) {
|
|
112
142
|
super();
|
|
@@ -8,6 +8,28 @@ import { type MiniMaxPresetModel, type OpenAITtsPresetModel } from "../presets.m
|
|
|
8
8
|
import type { TtsConfig } from "../types.mjs";
|
|
9
9
|
import type { CartesiaSampleRate, ElevenLabsSampleRate, GoogleTTSSampleRate, MicrosoftSampleRate } from "./base.mjs";
|
|
10
10
|
import { BaseTTS } from "./base.mjs";
|
|
11
|
+
export interface SonioxTTSOptions {
|
|
12
|
+
apiKey: string;
|
|
13
|
+
baseUrl?: string;
|
|
14
|
+
model?: string;
|
|
15
|
+
language?: string;
|
|
16
|
+
voice?: string;
|
|
17
|
+
sampleRate?: number;
|
|
18
|
+
/** Speech rate multiplier, from 0.7 to 1.3 inclusive. */
|
|
19
|
+
speed?: number;
|
|
20
|
+
reduceSilence?: boolean;
|
|
21
|
+
returnTimestamps?: boolean;
|
|
22
|
+
clientReferenceId?: string;
|
|
23
|
+
dump?: boolean;
|
|
24
|
+
skipPatterns?: number[];
|
|
25
|
+
additionalParams?: Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
/** Soniox streaming TTS. Only apiKey is required. */
|
|
28
|
+
export declare class SonioxTTS extends BaseTTS {
|
|
29
|
+
private readonly options;
|
|
30
|
+
constructor(options: SonioxTTSOptions);
|
|
31
|
+
toConfig(): TtsConfig;
|
|
32
|
+
}
|
|
11
33
|
/** Gemini 3.8 Flash TTS model. */
|
|
12
34
|
export declare const GeminiTTSModels: {
|
|
13
35
|
readonly Flash38: "gemini-3.8-flash-tts";
|
|
@@ -5,6 +5,21 @@ import { SarvamTtsParams as SarvamTtsParamsNS } from "../../api/types/SarvamTtsP
|
|
|
5
5
|
import { CredentialMode } from "../constants.mjs";
|
|
6
6
|
import { MiniMaxPresetModels, OpenAITtsPresetModels, } from "../presets.mjs";
|
|
7
7
|
import { BaseTTS } from "./base.mjs";
|
|
8
|
+
/** Soniox streaming TTS. Only apiKey is required. */
|
|
9
|
+
export class SonioxTTS extends BaseTTS {
|
|
10
|
+
constructor(options) {
|
|
11
|
+
super();
|
|
12
|
+
this.options = options;
|
|
13
|
+
requireString(options.apiKey, "apiKey", "SonioxTTS");
|
|
14
|
+
if (options.speed !== undefined && !(options.speed >= 0.7 && options.speed <= 1.3)) {
|
|
15
|
+
throw new Error("SonioxTTS speed must be between 0.7 and 1.3");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
toConfig() {
|
|
19
|
+
const { apiKey, baseUrl, model, language, voice, sampleRate, speed, reduceSilence, returnTimestamps, clientReferenceId, dump, skipPatterns, additionalParams, } = this.options;
|
|
20
|
+
return Object.assign({ vendor: "soniox", params: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, additionalParams), { api_key: apiKey }), (baseUrl !== undefined && { base_url: baseUrl })), (model !== undefined && { model })), (language !== undefined && { language })), (voice !== undefined && { voice })), (sampleRate !== undefined && { sample_rate: sampleRate })), (speed !== undefined && { speed })), (reduceSilence !== undefined && { reduce_silence: reduceSilence })), (returnTimestamps !== undefined && { return_timestamps: returnTimestamps })), (clientReferenceId !== undefined && { client_reference_id: clientReferenceId })), (dump !== undefined && { dump })) }, (skipPatterns !== undefined && { skip_patterns: skipPatterns }));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
8
23
|
/** Gemini 3.8 Flash TTS model. */
|
|
9
24
|
export const GeminiTTSModels = {
|
|
10
25
|
Flash38: "gemini-3.8-flash-tts",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as Agora from "../index.mjs";
|
|
2
|
-
export type Asr = Agora.Asr.Ares | Agora.Asr.Fengming | Agora.Asr.Tencent | Agora.Asr.Microsoft | Agora.Asr.Deepgram | Agora.Asr.Openai | Agora.Asr.Google | Agora.Asr.Gemini | Agora.Asr.Amazon | Agora.Asr.Assemblyai | Agora.Asr.Speechmatics | Agora.Asr.Sarvam | Agora.Asr.Rtzr | Agora.Asr.Xai | Agora.Asr.Xfyun | Agora.Asr.XfyunBigmodel | Agora.Asr.XfyunDialect | Agora.Asr.Smallestai;
|
|
2
|
+
export type Asr = Agora.Asr.Ares | Agora.Asr.Fengming | Agora.Asr.Tencent | Agora.Asr.Microsoft | Agora.Asr.Deepgram | Agora.Asr.Openai | Agora.Asr.Google | Agora.Asr.Gemini | Agora.Asr.Amazon | Agora.Asr.Assemblyai | Agora.Asr.Speechmatics | Agora.Asr.Sarvam | Agora.Asr.Rtzr | Agora.Asr.Xai | Agora.Asr.Xfyun | Agora.Asr.XfyunBigmodel | Agora.Asr.XfyunDialect | Agora.Asr.Smallestai | Agora.Asr.Stepfun;
|
|
3
3
|
export declare namespace Asr {
|
|
4
4
|
interface Ares extends Agora.AresAsr {
|
|
5
5
|
vendor: "ares";
|
|
@@ -55,4 +55,7 @@ export declare namespace Asr {
|
|
|
55
55
|
interface Smallestai extends Agora.SmallestAiAsr {
|
|
56
56
|
vendor: "smallestai";
|
|
57
57
|
}
|
|
58
|
+
interface Stepfun extends Agora.StepfunAsr {
|
|
59
|
+
vendor: "stepfun";
|
|
60
|
+
}
|
|
58
61
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as Agora from "../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* MiniMax duplex streaming Text-to-Speech configuration.
|
|
4
|
+
*/
|
|
5
|
+
export interface MinimaxDuplexTts {
|
|
6
|
+
/** Whether to enable batch processing for MiniMax duplex streaming TTS. Omit this field to use the server default of true. */
|
|
7
|
+
batch?: boolean;
|
|
8
|
+
/** Whether to enable word-level output for MiniMax duplex streaming TTS. Omit this field to leave it unset in the request. */
|
|
9
|
+
enable_words?: boolean;
|
|
10
|
+
params: Agora.MinimaxDuplexTtsParams;
|
|
11
|
+
/** Controls whether the TTS module skips bracketed content when reading LLM response text. */
|
|
12
|
+
skip_patterns?: number[];
|
|
13
|
+
}
|