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.
Files changed (61) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/agentkit/AgentSession.js +8 -5
  3. package/dist/cjs/agentkit/index.d.ts +7 -6
  4. package/dist/cjs/agentkit/index.js +7 -3
  5. package/dist/cjs/agentkit/token.d.ts +38 -3
  6. package/dist/cjs/agentkit/token.js +28 -1
  7. package/dist/cjs/agentkit/vendors/cn.d.ts +34 -0
  8. package/dist/cjs/agentkit/vendors/cn.js +33 -1
  9. package/dist/cjs/agentkit/vendors/tts.d.ts +22 -0
  10. package/dist/cjs/agentkit/vendors/tts.js +17 -1
  11. package/dist/cjs/api/types/Asr.d.ts +4 -1
  12. package/dist/cjs/api/types/MinimaxDuplexTts.d.ts +13 -0
  13. package/dist/cjs/api/types/MinimaxDuplexTts.js +3 -0
  14. package/dist/cjs/api/types/MinimaxDuplexTtsParams.d.ts +87 -0
  15. package/dist/cjs/api/types/MinimaxDuplexTtsParams.js +3 -0
  16. package/dist/cjs/api/types/SonioxTts.d.ts +9 -0
  17. package/dist/cjs/api/types/SonioxTts.js +3 -0
  18. package/dist/cjs/api/types/SonioxTtsParams.d.ts +29 -0
  19. package/dist/cjs/api/types/SonioxTtsParams.js +3 -0
  20. package/dist/cjs/api/types/StepfunAsr.d.ts +10 -0
  21. package/dist/cjs/api/types/StepfunAsr.js +3 -0
  22. package/dist/cjs/api/types/StepfunAsrParams.d.ts +9 -0
  23. package/dist/cjs/api/types/StepfunAsrParams.js +3 -0
  24. package/dist/cjs/api/types/Tts.d.ts +7 -1
  25. package/dist/cjs/api/types/index.d.ts +6 -0
  26. package/dist/cjs/api/types/index.js +6 -0
  27. package/dist/cjs/index.d.ts +2 -2
  28. package/dist/cjs/index.js +7 -3
  29. package/dist/cjs/version.d.ts +1 -1
  30. package/dist/cjs/version.js +1 -1
  31. package/dist/esm/BaseClient.mjs +2 -2
  32. package/dist/esm/agentkit/AgentSession.mjs +8 -5
  33. package/dist/esm/agentkit/index.d.mts +7 -6
  34. package/dist/esm/agentkit/index.mjs +3 -3
  35. package/dist/esm/agentkit/token.d.mts +38 -3
  36. package/dist/esm/agentkit/token.mjs +27 -1
  37. package/dist/esm/agentkit/vendors/cn.d.mts +34 -0
  38. package/dist/esm/agentkit/vendors/cn.mjs +30 -0
  39. package/dist/esm/agentkit/vendors/tts.d.mts +22 -0
  40. package/dist/esm/agentkit/vendors/tts.mjs +15 -0
  41. package/dist/esm/api/types/Asr.d.mts +4 -1
  42. package/dist/esm/api/types/MinimaxDuplexTts.d.mts +13 -0
  43. package/dist/esm/api/types/MinimaxDuplexTts.mjs +2 -0
  44. package/dist/esm/api/types/MinimaxDuplexTtsParams.d.mts +87 -0
  45. package/dist/esm/api/types/MinimaxDuplexTtsParams.mjs +2 -0
  46. package/dist/esm/api/types/SonioxTts.d.mts +9 -0
  47. package/dist/esm/api/types/SonioxTts.mjs +2 -0
  48. package/dist/esm/api/types/SonioxTtsParams.d.mts +29 -0
  49. package/dist/esm/api/types/SonioxTtsParams.mjs +2 -0
  50. package/dist/esm/api/types/StepfunAsr.d.mts +10 -0
  51. package/dist/esm/api/types/StepfunAsr.mjs +2 -0
  52. package/dist/esm/api/types/StepfunAsrParams.d.mts +9 -0
  53. package/dist/esm/api/types/StepfunAsrParams.mjs +2 -0
  54. package/dist/esm/api/types/Tts.d.mts +7 -1
  55. package/dist/esm/api/types/index.d.mts +6 -0
  56. package/dist/esm/api/types/index.mjs +6 -0
  57. package/dist/esm/index.d.mts +2 -2
  58. package/dist/esm/index.mjs +4 -4
  59. package/dist/esm/version.d.mts +1 -1
  60. package/dist/esm/version.mjs +1 -1
  61. package/package.json +1 -1
@@ -41,8 +41,8 @@ function normalizeClientOptions(options) {
41
41
  const headers = (0, headers_js_1.mergeHeaders)({
42
42
  "X-Fern-Language": "JavaScript",
43
43
  "X-Fern-SDK-Name": "agora-agents",
44
- "X-Fern-SDK-Version": "v2.13.0",
45
- "User-Agent": "agora-agents/v2.13.0",
44
+ "X-Fern-SDK-Version": "v2.14.0",
45
+ "User-Agent": "agora-agents/v2.14.0",
46
46
  "X-Fern-Runtime": core.RUNTIME.type,
47
47
  "X-Fern-Runtime-Version": core.RUNTIME.version,
48
48
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -233,6 +233,7 @@ class AgentSession {
233
233
  * @throws {Error} If configuration is invalid
234
234
  */
235
235
  _validateAvatarConfig() {
236
+ var _a;
236
237
  const agentConfig = this._agent.config;
237
238
  const avatar = agentConfig.avatar;
238
239
  const tts = this._agent.tts;
@@ -264,11 +265,13 @@ class AgentSession {
264
265
  // Note: tts can be a string (shorthand) or an object with params
265
266
  // Sample-rate fields vary by provider, so check the generated wire names dynamically.
266
267
  const ttsParams = tts && typeof tts !== "string" ? tts.params : undefined;
267
- const sampleRate = ttsParams && "sample_rate" in ttsParams
268
- ? ttsParams.sample_rate
269
- : ttsParams && "speech_sample_rate" in ttsParams
270
- ? ttsParams.speech_sample_rate
271
- : undefined;
268
+ const sampleRate = tts && typeof tts !== "string" && tts.vendor === "minimax_duplex"
269
+ ? (_a = tts.params.audio_setting) === null || _a === void 0 ? void 0 : _a.sample_rate
270
+ : ttsParams && "sample_rate" in ttsParams
271
+ ? ttsParams.sample_rate
272
+ : ttsParams && "speech_sample_rate" in ttsParams
273
+ ? ttsParams.speech_sample_rate
274
+ : undefined;
272
275
  if (typeof sampleRate === "number") {
273
276
  if ((0, avatar_types_js_1.isHeyGenAvatar)(strictAvatar) || (0, avatar_types_js_1.isLiveAvatarAvatar)(strictAvatar) || (0, avatar_types_js_1.isAkoolAvatar)(strictAvatar)) {
274
277
  (0, avatar_types_js_1.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.js";
21
22
  export type { AgentsClient } from "../api/resources/agents/client/Client.js";
22
23
  export type { AgentOptions } from "./Agent.js";
23
24
  export { Agent } from "./Agent.js";
@@ -32,20 +33,20 @@ export { AgentPresets, normalizePresetInput } from "./presets.js";
32
33
  export type { PreviewFeature, PreviewRoute } from "./preview/client.js";
33
34
  export { createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./preview/client.js";
34
35
  export type { AvatarVendor, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, LlmVendor, SttVendor, TtsVendor, } from "./region-vendors.js";
35
- export type { GenerateConvoAITokenOptions, GenerateTokenOptions, } from "./token.js";
36
- export { ExpiresIn, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.js";
36
+ export type { GenerateClientTokenOptions, GenerateConvoAITokenOptions, GenerateTokenOptions, } from "./token.js";
37
+ export { ExpiresIn, generateClientToken, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.js";
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.js";
38
39
  export type { AkoolAvatarOptions, AnamAvatarOptions, GenericAvatarOptions, HeyGenAvatarOptions, LemonSliceOptions, LiveAvatarAvatarOptions, ProtofaceOptions, TavusOptions, } from "./vendors/avatar.js";
39
40
  export { AkoolAvatar, AnamAvatar, GenericAvatar, HeyGenAvatar, LemonSlice, LiveAvatarAvatar, Protoface, Tavus, } from "./vendors/avatar.js";
40
41
  export type { AkoolSampleRate, CartesiaSampleRate, ElevenLabsSampleRate, HeyGenSampleRate, LiveAvatarSampleRate, MicrosoftSampleRate, SampleRate, } from "./vendors/base.js";
41
42
  export { BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNMLLM, BaseCNSTT, BaseCNTTS, BaseLLM, type BaseLlmOptions, BaseMLLM, type BaseMllmOptions, BaseSTT, BaseTTS, type GoogleTTSSampleRate, } from "./vendors/base.js";
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.js";
43
- export { AliyunLLM, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CosyVoiceTTS, DeepSeekLLM, FengmingSTT, MicrosoftCNSTT, MicrosoftCNTTS, MiniMaxCNTTS, SensetimeAvatar, SpatiusAvatar, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./vendors/cn.js";
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.js";
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.js";
44
45
  export type { AmazonBedrockOptions, AnthropicOptions, AzureOpenAIOptions, CustomLLMOptions, DifyOptions, GeminiOptions, GroqOptions, OpenAIOptions, VertexAILLMOptions, } from "./vendors/llm.js";
45
46
  export { AmazonBedrock, Anthropic, AzureOpenAI, CustomLLM, Dify, Gemini, Groq, OpenAI, VertexAILLM, } from "./vendors/llm.js";
46
47
  export type { AzureOpenAIRealtimeOptions, AzureOpenAIRealtimeParams, GeminiLiveModel, GeminiLiveOptions, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, OpenAIGPTLiveOptions, OpenAIRealtimeOptions, QwenOmniOptions, VertexAIOptions, XaiGrokOptions, } from "./vendors/mllm.js";
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.js";
48
49
  export type { AmazonSTTOptions, AresSTTOptions, AssemblyAISTTOptions, DeepgramSTTOptions, GeminiSTTModel, GeminiSTTOptions, GoogleSTTOptions, MicrosoftSTTOptions, OpenAISTTOptions, RTZRSTTOptions, SarvamSTTOptions, SmallestAISTTOptions, SpeechmaticsSTTOptions, XAiSTTOptions, } from "./vendors/stt.js";
49
50
  export { AmazonSTT, AresSTT, AssemblyAISTT, DeepgramSTT, GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode, GoogleSTT, MicrosoftSTT, OpenAISTT, RTZRSTT, SarvamSTT, SmallestAISTT, SpeechmaticsSTT, XAiSTT, } from "./vendors/stt.js";
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.js";
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.js";
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.js";
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.js";
@@ -21,9 +21,9 @@
21
21
  */
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
23
  exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.createPreviewRoute = exports.normalizePresetInput = exports.AgentPresets = exports.redactSecrets = exports.redactHeadersForDebug = exports.REDACTED = exports.TurnDetectionTypeValues = exports.ThinkOnThinkingActionInterrupt = exports.ThinkOnThinkingActionIgnore = exports.ThinkOnSpeakingActionInterrupt = exports.ThinkOnSpeakingActionIgnore = exports.ThinkOnListeningActionInterrupt = exports.ThinkOnListeningActionInject = exports.ThinkOnListeningActionIgnore = exports.SpeakPriorityValues = exports.SpeakPriorityInterrupt = exports.SpeakPriorityIgnore = exports.SpeakPriorityAppend = exports.SilenceActionValues = exports.SalModeValues = exports.MllmTurnDetectionModeValues = exports.MllmTurnDetectionModeServerVad = exports.MllmTurnDetectionModeSemanticVad = exports.MllmTurnDetectionModeAgoraVad = exports.InterruptionModeValues = exports.InterruptionModeStartOfSpeech = exports.InterruptionModeKeywords = exports.InterruptionDisabledStrategyIgnore = exports.InterruptionDisabledStrategyAppend = exports.InterruptionDisabledStrategy = exports.Geofence = exports.FillerWordsSelectionRule = exports.DataChannel = exports.CredentialMode = exports.AudioScenario = exports.validateTtsSampleRate = exports.validateAvatarConfig = exports.toBaseAvatarConfig = exports.isSpatiusAvatar = exports.isSensetimeAvatar = exports.isLiveAvatarAvatar = exports.isHeyGenAvatar = exports.isGenericAvatar = exports.isAvatarTokenManaged = exports.isAnamAvatar = exports.isAkoolAvatar = exports.AgentSession = exports.Agent = void 0;
24
- exports.Gemini = exports.Dify = exports.CustomLLM = exports.AzureOpenAI = exports.Anthropic = exports.AmazonBedrock = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.TencentTTS = exports.TencentSTT = exports.TencentLLM = exports.StepFunTTS = exports.SpatiusAvatar = exports.SensetimeAvatar = exports.MiniMaxCNTTS = exports.MicrosoftCNTTS = exports.MicrosoftCNSTT = exports.FengmingSTT = exports.DeepSeekLLM = exports.CosyVoiceTTS = exports.BytedanceTTS = exports.BytedanceLLM = exports.BytedanceDuplexTTS = exports.AliyunLLM = exports.BaseTTS = exports.BaseSTT = exports.BaseMLLM = exports.BaseLLM = exports.BaseCNTTS = exports.BaseCNSTT = exports.BaseCNMLLM = exports.BaseCNLLM = exports.BaseCNAvatar = exports.BaseAvatar = exports.Tavus = exports.Protoface = exports.LiveAvatarAvatar = exports.LemonSlice = exports.HeyGenAvatar = exports.GenericAvatar = exports.AnamAvatar = exports.AkoolAvatar = exports.MAX_EXPIRY_SECONDS = exports.generateRtcToken = exports.generateConvoAIToken = exports.ExpiresIn = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = void 0;
25
- exports.SmallestAITTS = exports.SarvamTTSLanguage = exports.SarvamTTS = exports.RimeTTS = exports.OpenAITTS = exports.MurfTTS = exports.MistralTTS = exports.MiniMaxTTS = exports.MicrosoftTTS = exports.HumeAITTS = exports.GradiumTTS = exports.GoogleTTS = exports.GenericTTS = exports.GeminiTTSModels = exports.GeminiTTS = exports.FishAudioTTS = exports.ElevenLabsTTS = exports.DeepgramTTS = exports.CartesiaTTS = exports.AmazonTTS = exports.XAiSTT = exports.SpeechmaticsSTT = exports.SmallestAISTT = exports.SarvamSTT = exports.RTZRSTT = exports.OpenAISTT = exports.MicrosoftSTT = exports.GoogleSTT = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = exports.DeepgramSTT = exports.AssemblyAISTT = exports.AresSTT = exports.AmazonSTT = exports.XaiGrok = exports.VertexAI = exports.QwenOmni = exports.OpenAIRealtime = exports.OpenAIGPTLive = exports.GeminiThinkingLevels = exports.GeminiLiveModels = exports.GeminiLive = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.AzureOpenAIRealtime = exports.VertexAILLM = exports.OpenAI = exports.Groq = void 0;
26
- exports.XAiTTS = exports.TypecastTTS = void 0;
24
+ exports.AzureOpenAI = exports.Anthropic = exports.AmazonBedrock = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.TencentTTS = exports.TencentSTT = exports.TencentLLM = exports.StepFunTTS = exports.StepFunSTT = exports.SpatiusAvatar = exports.SensetimeAvatar = exports.MiniMaxDuplexTTS = exports.MiniMaxCNTTS = exports.MicrosoftCNTTS = exports.MicrosoftCNSTT = exports.FengmingSTT = exports.DeepSeekLLM = exports.CosyVoiceTTS = exports.BytedanceTTS = exports.BytedanceLLM = exports.BytedanceDuplexTTS = exports.AliyunLLM = exports.BaseTTS = exports.BaseSTT = exports.BaseMLLM = exports.BaseLLM = exports.BaseCNTTS = exports.BaseCNSTT = exports.BaseCNMLLM = exports.BaseCNLLM = exports.BaseCNAvatar = exports.BaseAvatar = exports.Tavus = exports.Protoface = exports.LiveAvatarAvatar = exports.LemonSlice = exports.HeyGenAvatar = exports.GenericAvatar = exports.AnamAvatar = exports.AkoolAvatar = exports.MAX_EXPIRY_SECONDS = exports.generateRtcToken = exports.generateConvoAIToken = exports.generateClientToken = exports.ExpiresIn = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = void 0;
25
+ exports.RimeTTS = exports.OpenAITTS = exports.MurfTTS = exports.MistralTTS = exports.MiniMaxTTS = exports.MicrosoftTTS = exports.HumeAITTS = exports.GradiumTTS = exports.GoogleTTS = exports.GenericTTS = exports.GeminiTTSModels = exports.GeminiTTS = exports.FishAudioTTS = exports.ElevenLabsTTS = exports.DeepgramTTS = exports.CartesiaTTS = exports.AmazonTTS = exports.XAiSTT = exports.SpeechmaticsSTT = exports.SmallestAISTT = exports.SarvamSTT = exports.RTZRSTT = exports.OpenAISTT = exports.MicrosoftSTT = exports.GoogleSTT = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = exports.DeepgramSTT = exports.AssemblyAISTT = exports.AresSTT = exports.AmazonSTT = exports.XaiGrok = exports.VertexAI = exports.QwenOmni = exports.OpenAIRealtime = exports.OpenAIGPTLive = exports.GeminiThinkingLevels = exports.GeminiLiveModels = exports.GeminiLive = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.AzureOpenAIRealtime = exports.VertexAILLM = exports.OpenAI = exports.Groq = exports.Gemini = exports.Dify = exports.CustomLLM = void 0;
26
+ exports.XAiTTS = exports.TypecastTTS = exports.SonioxTTS = exports.SmallestAITTS = exports.SarvamTTSLanguage = exports.SarvamTTS = void 0;
27
27
  // Core classes
28
28
  var Agent_js_1 = require("./Agent.js");
29
29
  Object.defineProperty(exports, "Agent", { enumerable: true, get: function () { return Agent_js_1.Agent; } });
@@ -89,6 +89,7 @@ Object.defineProperty(exports, "requiredPreviewFeatures", { enumerable: true, ge
89
89
  // Token generation
90
90
  var token_js_1 = require("./token.js");
91
91
  Object.defineProperty(exports, "ExpiresIn", { enumerable: true, get: function () { return token_js_1.ExpiresIn; } });
92
+ Object.defineProperty(exports, "generateClientToken", { enumerable: true, get: function () { return token_js_1.generateClientToken; } });
92
93
  Object.defineProperty(exports, "generateConvoAIToken", { enumerable: true, get: function () { return token_js_1.generateConvoAIToken; } });
93
94
  Object.defineProperty(exports, "generateRtcToken", { enumerable: true, get: function () { return token_js_1.generateRtcToken; } });
94
95
  Object.defineProperty(exports, "MAX_EXPIRY_SECONDS", { enumerable: true, get: function () { return token_js_1.MAX_EXPIRY_SECONDS; } });
@@ -125,8 +126,10 @@ Object.defineProperty(exports, "FengmingSTT", { enumerable: true, get: function
125
126
  Object.defineProperty(exports, "MicrosoftCNSTT", { enumerable: true, get: function () { return cn_js_1.MicrosoftCNSTT; } });
126
127
  Object.defineProperty(exports, "MicrosoftCNTTS", { enumerable: true, get: function () { return cn_js_1.MicrosoftCNTTS; } });
127
128
  Object.defineProperty(exports, "MiniMaxCNTTS", { enumerable: true, get: function () { return cn_js_1.MiniMaxCNTTS; } });
129
+ Object.defineProperty(exports, "MiniMaxDuplexTTS", { enumerable: true, get: function () { return cn_js_1.MiniMaxDuplexTTS; } });
128
130
  Object.defineProperty(exports, "SensetimeAvatar", { enumerable: true, get: function () { return cn_js_1.SensetimeAvatar; } });
129
131
  Object.defineProperty(exports, "SpatiusAvatar", { enumerable: true, get: function () { return cn_js_1.SpatiusAvatar; } });
132
+ Object.defineProperty(exports, "StepFunSTT", { enumerable: true, get: function () { return cn_js_1.StepFunSTT; } });
130
133
  Object.defineProperty(exports, "StepFunTTS", { enumerable: true, get: function () { return cn_js_1.StepFunTTS; } });
131
134
  Object.defineProperty(exports, "TencentLLM", { enumerable: true, get: function () { return cn_js_1.TencentLLM; } });
132
135
  Object.defineProperty(exports, "TencentSTT", { enumerable: true, get: function () { return cn_js_1.TencentSTT; } });
@@ -198,5 +201,6 @@ Object.defineProperty(exports, "RimeTTS", { enumerable: true, get: function () {
198
201
  Object.defineProperty(exports, "SarvamTTS", { enumerable: true, get: function () { return tts_js_1.SarvamTTS; } });
199
202
  Object.defineProperty(exports, "SarvamTTSLanguage", { enumerable: true, get: function () { return tts_js_1.SarvamTTSLanguage; } });
200
203
  Object.defineProperty(exports, "SmallestAITTS", { enumerable: true, get: function () { return tts_js_1.SmallestAITTS; } });
204
+ Object.defineProperty(exports, "SonioxTTS", { enumerable: true, get: function () { return tts_js_1.SonioxTTS; } });
201
205
  Object.defineProperty(exports, "TypecastTTS", { enumerable: true, get: function () { return tts_js_1.TypecastTTS; } });
202
206
  Object.defineProperty(exports, "XAiTTS", { enumerable: true, get: function () { return tts_js_1.XAiTTS; } });
@@ -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
- /** Numeric ConvoAI participant UID. Use the RTC UID for a user, agent, or avatar. */
78
- uid: number;
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;
@@ -5,7 +5,10 @@
5
5
  * - RTC tokens authenticate a specific (appId, channel, uid) combination with
6
6
  * the Agora RTC network.
7
7
  * - ConvoAI tokens are RTC + RTM + ConvoAI tokens used to authenticate
8
- * ConvoAI REST API calls via `Authorization: agora token=<token>`.
8
+ * ConvoAI REST API calls via `Authorization: agora token=<token>`. Keep them
9
+ * on the server.
10
+ * - Client tokens are RTC + RTM only, for front-end token routes. They join a
11
+ * channel and log in to RTM but cannot call the ConvoAI REST API.
9
12
  *
10
13
  * The `agora-token` library handles the JWT signing.
11
14
  */
@@ -17,6 +20,7 @@ exports.ExpiresIn = exports.MAX_EXPIRY_SECONDS = void 0;
17
20
  exports.generateRtcToken = generateRtcToken;
18
21
  exports.generateRtcTokenWithAccount = generateRtcTokenWithAccount;
19
22
  exports.generateConvoAIToken = generateConvoAIToken;
23
+ exports.generateClientToken = generateClientToken;
20
24
  const agora_token_1 = __importDefault(require("agora-token"));
21
25
  const DEFAULT_EXPIRY_SECONDS = 86400;
22
26
  exports.MAX_EXPIRY_SECONDS = 86400;
@@ -156,8 +160,31 @@ function generateConvoAIToken(opts) {
156
160
  return _requireBuiltToken(agora_token_1.default.ConvoAITokenBuilder.buildToken(opts.appId, opts.appCertificate, opts.channelName, account, agora_token_1.default.RtcRole.PUBLISHER, tokenExpire, privilegeExpire, privilegeExpire, privilegeExpire, privilegeExpire, account, privilegeExpire), opts.appId, opts.appCertificate);
157
161
  }
158
162
  function _uidToAccount(uid) {
163
+ if (typeof uid === "string") {
164
+ return uid;
165
+ }
159
166
  if (!Number.isInteger(uid)) {
160
167
  throw new Error("uid must be an integer when provided as a number");
161
168
  }
162
169
  return String(uid);
163
170
  }
171
+ /**
172
+ * Builds an RTC + RTM token for a front-end client. Use it in token routes that
173
+ * hand tokens to browsers or apps.
174
+ *
175
+ * The token joins the RTC channel as a publisher and logs in to RTM, the data
176
+ * channel for agent transcripts and state. It carries no ConvoAI service, so it
177
+ * cannot authenticate ConvoAI REST calls. Use {@link generateConvoAIToken} for
178
+ * server-side REST authentication and agent tokens instead.
179
+ */
180
+ function generateClientToken(opts) {
181
+ var _a;
182
+ const account = _uidToAccount(opts.uid);
183
+ if (account === "" || /^0+$/.test(account)) {
184
+ throw new Error("uid must be nonzero and nonempty: it is also the RTM user ID");
185
+ }
186
+ const tokenExpire = (_a = opts.tokenExpire) !== null && _a !== void 0 ? _a : DEFAULT_EXPIRY_SECONDS;
187
+ // Per Agora docs, privilegeExpire=0 means "expires immediately", which is invalid.
188
+ const privilegeExpire = opts.privilegeExpire || tokenExpire;
189
+ return _requireBuiltToken(agora_token_1.default.RtcTokenBuilder.buildTokenWithRtm(opts.appId, opts.appCertificate, opts.channelName, account, agora_token_1.default.RtcRole.PUBLISHER, tokenExpire, privilegeExpire), opts.appId, opts.appCertificate);
190
+ }
@@ -1,3 +1,4 @@
1
+ import type { MinimaxDuplexTtsParams } from "../../api/index.js";
1
2
  import type { AvatarConfig, LlmConfig, SttConfig, TtsConfig } from "../types.js";
2
3
  import { BaseCNAvatar, BaseCNLLM, BaseCNSTT, BaseCNTTS, type BaseLlmOptions } from "./base.js";
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;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SpatiusAvatar = exports.SensetimeAvatar = exports.TencentLLM = exports.DeepSeekLLM = exports.BytedanceLLM = exports.AliyunLLM = exports.StepFunTTS = exports.BytedanceDuplexTTS = exports.CosyVoiceTTS = exports.BytedanceTTS = exports.TencentTTS = exports.MicrosoftCNTTS = exports.MiniMaxCNTTS = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.XfyunSTT = exports.TencentSTT = exports.MicrosoftCNSTT = exports.FengmingSTT = void 0;
3
+ exports.SpatiusAvatar = exports.SensetimeAvatar = exports.TencentLLM = exports.DeepSeekLLM = exports.BytedanceLLM = exports.AliyunLLM = exports.StepFunTTS = exports.BytedanceDuplexTTS = exports.CosyVoiceTTS = exports.BytedanceTTS = exports.TencentTTS = exports.MicrosoftCNTTS = exports.MiniMaxCNTTS = exports.MiniMaxDuplexTTS = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.XfyunSTT = exports.TencentSTT = exports.MicrosoftCNSTT = exports.StepFunSTT = exports.FengmingSTT = void 0;
4
4
  const base_js_1 = require("./base.js");
5
5
  function requireString(value, field, vendor) {
6
6
  if (typeof value !== "string" || value.length === 0) {
@@ -23,6 +23,21 @@ class FengmingSTT extends base_js_1.BaseCNSTT {
23
23
  }
24
24
  }
25
25
  exports.FengmingSTT = FengmingSTT;
26
+ /** StepFun ASR for mainland China. */
27
+ class StepFunSTT extends base_js_1.BaseCNSTT {
28
+ constructor(options) {
29
+ super();
30
+ this.options = options;
31
+ requireString(options.apiKey, "apiKey", "StepFunSTT");
32
+ }
33
+ toConfig() {
34
+ return {
35
+ vendor: "stepfun",
36
+ params: Object.assign(Object.assign({}, this.options.additionalParams), { api_key: this.options.apiKey }),
37
+ };
38
+ }
39
+ }
40
+ exports.StepFunSTT = StepFunSTT;
26
41
  class MicrosoftCNSTT extends base_js_1.BaseCNSTT {
27
42
  constructor(options) {
28
43
  super();
@@ -116,6 +131,23 @@ class XfyunDialectSTT extends base_js_1.BaseCNSTT {
116
131
  }
117
132
  }
118
133
  exports.XfyunDialectSTT = XfyunDialectSTT;
134
+ /** MiniMax duplex streaming TTS. Currently available only in mainland China. */
135
+ class MiniMaxDuplexTTS extends base_js_1.BaseCNTTS {
136
+ constructor(options) {
137
+ var _a;
138
+ super();
139
+ this.options = options;
140
+ requireString(options.key, "key", "MiniMaxDuplexTTS");
141
+ requireString(options.model, "model", "MiniMaxDuplexTTS");
142
+ requireString((_a = options.voiceSetting) === null || _a === void 0 ? void 0 : _a.voice_id, "voiceSetting.voice_id", "MiniMaxDuplexTTS");
143
+ }
144
+ toConfig() {
145
+ const { key, model, url, voiceSetting, audioSetting, pronunciationDict, voiceModify, languageBoost, textNormalizationMode, subtitleEnable, subtitleType, continuousSound, sessionId, skipPatterns, additionalParams, } = this.options;
146
+ 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,
147
+ 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 }));
148
+ }
149
+ }
150
+ exports.MiniMaxDuplexTTS = MiniMaxDuplexTTS;
119
151
  class MiniMaxCNTTS extends base_js_1.BaseCNTTS {
120
152
  constructor(options) {
121
153
  super();
@@ -8,6 +8,28 @@ import { type MiniMaxPresetModel, type OpenAITtsPresetModel } from "../presets.j
8
8
  import type { TtsConfig } from "../types.js";
9
9
  import type { CartesiaSampleRate, ElevenLabsSampleRate, GoogleTTSSampleRate, MicrosoftSampleRate } from "./base.js";
10
10
  import { BaseTTS } from "./base.js";
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";
@@ -3,11 +3,27 @@
3
3
  * Type-safe TTS (Text-to-Speech) vendor classes.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.SmallestAITTS = exports.XAiTTS = exports.GenericTTS = exports.MurfTTS = exports.SarvamTTS = exports.SarvamTTSLanguage = exports.MiniMaxTTS = exports.FishAudioTTS = exports.RimeTTS = exports.HumeAITTS = exports.TypecastTTS = exports.MistralTTS = exports.GradiumTTS = exports.DeepgramTTS = exports.AmazonTTS = exports.GoogleTTS = exports.CartesiaTTS = exports.OpenAITTS = exports.MicrosoftTTS = exports.ElevenLabsTTS = exports.GeminiTTS = exports.GeminiTTSModels = void 0;
6
+ exports.SmallestAITTS = exports.XAiTTS = exports.GenericTTS = exports.MurfTTS = exports.SarvamTTS = exports.SarvamTTSLanguage = exports.MiniMaxTTS = exports.FishAudioTTS = exports.RimeTTS = exports.HumeAITTS = exports.TypecastTTS = exports.MistralTTS = exports.GradiumTTS = exports.DeepgramTTS = exports.AmazonTTS = exports.GoogleTTS = exports.CartesiaTTS = exports.OpenAITTS = exports.MicrosoftTTS = exports.ElevenLabsTTS = exports.GeminiTTS = exports.GeminiTTSModels = exports.SonioxTTS = void 0;
7
7
  const SarvamTtsParams_js_1 = require("../../api/types/SarvamTtsParams.js");
8
8
  const constants_js_1 = require("../constants.js");
9
9
  const presets_js_1 = require("../presets.js");
10
10
  const base_js_1 = require("./base.js");
11
+ /** Soniox streaming TTS. Only apiKey is required. */
12
+ class SonioxTTS extends base_js_1.BaseTTS {
13
+ constructor(options) {
14
+ super();
15
+ this.options = options;
16
+ requireString(options.apiKey, "apiKey", "SonioxTTS");
17
+ if (options.speed !== undefined && !(options.speed >= 0.7 && options.speed <= 1.3)) {
18
+ throw new Error("SonioxTTS speed must be between 0.7 and 1.3");
19
+ }
20
+ }
21
+ toConfig() {
22
+ const { apiKey, baseUrl, model, language, voice, sampleRate, speed, reduceSilence, returnTimestamps, clientReferenceId, dump, skipPatterns, additionalParams, } = this.options;
23
+ 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 }));
24
+ }
25
+ }
26
+ exports.SonioxTTS = SonioxTTS;
11
27
  /** Gemini 3.8 Flash TTS model. */
12
28
  exports.GeminiTTSModels = {
13
29
  Flash38: "gemini-3.8-flash-tts",
@@ -1,5 +1,5 @@
1
1
  import type * as Agora from "../index.js";
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.js";
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
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,87 @@
1
+ /**
2
+ * MiniMax duplex streaming TTS configuration parameters.
3
+ */
4
+ export interface MinimaxDuplexTtsParams {
5
+ /** MiniMax API key. */
6
+ key: string;
7
+ /** WebSocket endpoint (e.g., wss://api.minimax.cn/ws/v1/t2a_v2_bidi). */
8
+ url?: string;
9
+ /** MiniMax model identifier (e.g., speech-2.8-turbo). */
10
+ model: string;
11
+ voice_setting: MinimaxDuplexTtsParams.VoiceSetting;
12
+ /** Audio output settings. */
13
+ audio_setting?: MinimaxDuplexTtsParams.AudioSetting;
14
+ /** Language boost mode (e.g., Chinese). */
15
+ language_boost?: string;
16
+ /** Text normalization mode (e.g., basic). */
17
+ text_normalization_mode?: string;
18
+ /** Custom pronunciation dictionary settings. */
19
+ pronunciation_dict?: MinimaxDuplexTtsParams.PronunciationDict;
20
+ /** Voice modification settings. */
21
+ voice_modify?: MinimaxDuplexTtsParams.VoiceModify;
22
+ /** Whether to enable subtitles. */
23
+ subtitle_enable?: boolean;
24
+ /** Subtitle granularity (e.g., word). */
25
+ subtitle_type?: string;
26
+ /** Whether to enable continuous sound. */
27
+ continuous_sound?: boolean;
28
+ /** Optional MiniMax provider session identifier. */
29
+ session_id?: string;
30
+ /** Accepts any additional properties */
31
+ [key: string]: any;
32
+ }
33
+ export declare namespace MinimaxDuplexTtsParams {
34
+ interface VoiceSetting {
35
+ /** Voice identifier (e.g., female-shaonv). */
36
+ voice_id: string;
37
+ /** Speech speed multiplier. */
38
+ speed?: number;
39
+ /** Voice volume multiplier. */
40
+ vol?: number;
41
+ /** Voice pitch adjustment. */
42
+ pitch?: number;
43
+ /** Emotion preset. */
44
+ emotion?: string;
45
+ /** Whether to read LaTeX expressions. */
46
+ latex_read?: boolean;
47
+ /** Accepts any additional properties */
48
+ [key: string]: any;
49
+ }
50
+ /**
51
+ * Audio output settings.
52
+ */
53
+ interface AudioSetting {
54
+ /** Audio sample rate in Hz. */
55
+ sample_rate?: number;
56
+ /** Audio output format (e.g., pcm). */
57
+ format?: string;
58
+ /** Number of audio channels. */
59
+ channels?: number;
60
+ /** Accepts any additional properties */
61
+ [key: string]: any;
62
+ }
63
+ /**
64
+ * Custom pronunciation dictionary settings.
65
+ */
66
+ interface PronunciationDict {
67
+ /** Pronunciation override list. */
68
+ tone?: string[];
69
+ /** Accepts any additional properties */
70
+ [key: string]: any;
71
+ }
72
+ /**
73
+ * Voice modification settings.
74
+ */
75
+ interface VoiceModify {
76
+ /** Voice modification pitch adjustment. */
77
+ pitch?: number;
78
+ /** Voice intensity adjustment. */
79
+ intensity?: number;
80
+ /** Voice timbre adjustment. */
81
+ timbre?: number;
82
+ /** Sound effect preset (e.g., spacious_echo). */
83
+ sound_effects?: string;
84
+ /** Accepts any additional properties */
85
+ [key: string]: any;
86
+ }
87
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import type * as Agora from "../index.js";
2
+ /**
3
+ * Soniox Text-to-Speech configuration.
4
+ */
5
+ export interface SonioxTts {
6
+ params: Agora.SonioxTtsParams;
7
+ /** Controls whether the TTS module skips bracketed content when reading LLM response text. */
8
+ skip_patterns?: number[];
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Soniox TTS configuration parameters. Only api_key is required.
3
+ */
4
+ export interface SonioxTtsParams {
5
+ /** Soniox API key. */
6
+ api_key: string;
7
+ /** WebSocket endpoint for Soniox streaming speech synthesis. */
8
+ base_url?: string;
9
+ /** Soniox TTS model name. */
10
+ model?: string;
11
+ /** Language code for speech synthesis. */
12
+ language?: string;
13
+ /** Soniox voice name. */
14
+ voice?: string;
15
+ /** Output audio sample rate in Hz. */
16
+ sample_rate?: number;
17
+ /** Speech rate multiplier, from 0.7 to 1.3 inclusive. */
18
+ speed?: number;
19
+ /** Whether to reduce silence in synthesized speech. */
20
+ reduce_silence?: boolean;
21
+ /** Whether to return timestamps for synthesized speech. */
22
+ return_timestamps?: boolean;
23
+ /** Client-provided reference identifier. */
24
+ client_reference_id?: string;
25
+ /** Whether to enable diagnostic dumping. */
26
+ dump?: boolean;
27
+ /** Accepts any additional properties */
28
+ [key: string]: any;
29
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import type * as Agora from "../index.js";
2
+ /**
3
+ * StepFun ASR configuration.
4
+ */
5
+ export interface StepfunAsr {
6
+ language?: Agora.AsrLanguage;
7
+ params: Agora.StepfunAsrParams;
8
+ /** Accepts any additional properties */
9
+ [key: string]: any;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * StepFun ASR configuration parameters.
3
+ */
4
+ export interface StepfunAsrParams {
5
+ /** StepFun API key. */
6
+ api_key: string;
7
+ /** Accepts any additional properties */
8
+ [key: string]: any;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });